You are on page 1of 20

C++

What is the namespace?

Describe what a SubClassing?

What is “inline” function?

When should I use references, and when should I use pointers?

Is there another way to tell the compiler to make a member function inline other than using inline
keyword?

What is a reference?

What happens if you return a reference?

What's the difference between public:, private:, and protected:?

Why Do we need Virtual Base Class?

Why Virtual Function?

Why should be base class destructor be virtual?

Usage of Static Variable?

Difference between Static and Global Variable?

Can we pass class variables to static functions?

Explain on Const?

Why we should implement copy constructor?

Why Friend Function?

What is an object?

What's the difference between the keywords struct and class?

Define Encapsualtion?
Can one constructor of a class call another constructor of the same class to initialize the this
object?

Is the default constructor for Fred always Fred::Fred()?

Should you use the this pointer in the constructor?

Can you initialize static member data in the constructor's initialization list?

What's the order that local objects are destructed?

void userCode()
{
Fred a;
Fred b;
// ...
}

What's the order that objects in an array are destructed?

void userCode()
{
Fred a[10];
// ...
}

Should I explicitly call a destructor on a local variable?

What is static binding and dynamic binding?

What you cannot inherit ?

Can you instantiate an Abstract Class?

Why we should not return reference or pointer to a local variable?

Can you instantiate Cobject?

Why is it important to use reference during "catch" statement?

What are the advantage and disadvantage of using exception handling?

How procompiled header work in windows?

What is a Constructor?
What is a Destrutor?

Write different types of Throw statement?

Can I free() pointers allocated with new ()?

Can I delete pointers allocated with malloc()?

What is a DownCast?

What is SizeOf() return?

What does mean int **p?

Why to use Void Pointer?

Where is Vtable Initialized?

What is a member Function?

What is a Polymorphic Class?

What is a conditional Compilation?

Use of Scope Resolution Operator?

What is a “This” pointer?

How to delete Arrays?

CMyObject *pobj = new CObject[128];

Difference Between Copy Constructor and Assignment operator?

Difference between Abstract and Interface ?

How will you handle a constructor that fails?


Why should I use new instead of trustworthy old malloc()?

What's the difference between "const Fred* p", "Fred* const p" and "const Fred* const p"?

How many ways are there to initialize an int with a constant?

STL
Advantage of STL?

What are templates?

Disadvantage of using Templates?

What is MAP in STL?

What is an Vector in STL?

What is an Iterator?

What is the difference between erase() and remove() of std::list?

What is the difference between vector and array?

What is the difference between list and vector?

Does MFC containers use STL?

MFC
Explain Document-view architecture

Difference between GetMessage & PeekMessage?

Explain Messaging in windows?

Exceptions in C++?
How will you create exception in your application?

What are the Exception Classes in MFC?

How to catch any Exception?

How will you make objects persistent in MFC?

Use of Carchive Class?

What is the MFC class to check Memory Leak?

What functions are used when DLL without import lib is used?

What are Advanced Type Cast Operators?

What happens when you add variable or add new function in debug session? Can you continue?

How do I write to the console window?

What is a Translate Message()?

What MFC classes that doesn’t support Message Mapping ?

How will you raise memory expection explicity?

How will you implement Message loop?

What is a Device Context ?

How do I create a CDC from a HDC?

How can I use a custom icon for a window?

How can get a pointer to a control from a already created dialog?

How do I subclass a control using MFC?

How can you change the size of a window?

How to work with RichEdit control?


Threads
Define Thread?

Define the threads supported by MFC ?

What does AfxBeginThread() does behind the scene?

What is the problem with AfxBeginThread() ?

How will you terminate Threads?

How will you establish communication between threads?

Difference between STA and MTA?

Explain Synchronizing Threads in MFC?

When to Use the Synchronization Classes?

Synchronization classes function used in Client Side and Component Side?

COM
What is COM?

Explain the role of windows registry in case of COM.

Diff between InProc and OutProc server in COM?

What's the difference between COM and DCOM?

Explain the diff between DLL and COM ?

Explain the Diff between Containment and Aggregation?

Define AUTOMATION?

Define ActiveX Controls ?

What are the Tools to Test ActiveX Controls?

What are the MFC classes supported for ActiveX controls ?


Explain Diff between ActiveX and DLL?

What is Marshalling?

How automation takes place in OLE?

What is a Type library?

What Interfaces must be supported for a ActiveX Component?

What is an Idispatch?

Methods exposed by Idispatch?

What is a dual interface?

What is the Advantage of server implementing as Dual Interface?

What method gets invoked during OLE Automation Server is called?

What is a structured Storage?

What is VARIANT? Why and where would you use it?

What are the different types of interfaces?

What is an HRESULT?

If you have an object with two interfaces, can you custom marshal one of them?

Is there a way to register in-proc server without regsvr32.exe?

What do you mean by Location Transparency?


Location transparency offers a number of advantages.

Write general Cstring Conversions? (into olestring / bstr / lpstr)

What is the size of BSTR?

What does in, out and retval signify when adding a method to an IDL file?

Which are the different ways in which we can access the methods of a component through an MFC
VC++ client?

Explain Security in COM?

What do you mean by object pooling?

OOPS
Define ROSE ?

Why OOPS getting popular?

Explain OO concepts.

What are Design Patterns? (RISS)

Explain the diff Pattern types?

What is MVC?

Explain Each: Scalable : Performance: Maintainablitly ?

Explain OMT?(Object Modeling Techniques)

Diff Between Association and Link?

Explain SOFTWARE LIFE CYCLE?

Explain Software Models available (Waterfall, spiral, RAD, Prototype)?

Define Lifecycle ?

Define Process ?

Define Process Models ?

Define CMM ?

Define Metrics ?

Difference between quality Control and Quality Assurance?


What does SQA means?

Explain Different types of TESTING ?

Define UML?

How do you run SQL statements from VC++?

What is a Trigger?

Explain each: DDL , DML, DCL and View ?

What class you in MFC use to connect to Database? And Connect to Tables?

Provide a SQL statement to SORT the records?

DataBase Arch

What is Normalization?

What is outer join?


What is a Cursor?

What is the Diff between Procedure and Function?

What is an Index table?

Explain the Levels Normalization Process?

Explain Different KEYS available in DB?

Define Entity Integrity ?

Define Referential Integrity ?

Define ER Diagram ?

Which of the following is the correct declaration for the function main() ?

if ptr is defined as int *ptr[][100]; which of the following correctly allocates memory for ptr?

Swapping Problem:
#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y); //swap action takes place
printf("%d %d\n",x,y);
swap2(x,y); //no swap action takes place
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
Ans

How do I prevent a the user from starting a second instance of my app?

How do I display a bitmap on a button?

How can I use my VB ActiveX dll from VC++?

How can I find the path my application or DLL was loaded from?

How can I shutdown the system programmatically?

How do I send/post a message to the main thread from another thread?

Explain the types of events CCmdTarget handles?

What are the Ways to add interface to a class?

Explaining Creating COM Objects?

Explain COM Threading models?

Which Threading Model will you choose?

What is the difference between Apartment Thread and Free Thread?

Explain about Sockets?

Explain different types of sokets?

Why catch by reference?

Explain Auto-ptr?

What happens when we run the following program?


1) A(){ A(); }
2) ~A() { A(); }
3) main()
{
A();
~A();
}
Diff between Calloc and Malloc?

Diff between CallbyValue and CallbyReference ?

Diff between While and Do-While?

What are Enum and TypeDef?

The purpose of vtable ?

What does Reference counting mechanism does?

Explain the CoCreateInstance functions inflexibility?

Explain creation of COM Object in detail?

What is a smart pointer?

Why do we need to cross the process boundry?

Explain about Idispatch and there calling methods?

Explain about TypeLibrary in detail?

Explain COM Threading Models?

Which type of thread should you use?

Explain DNA?

What does “component support binary compatibility” means?


Explain MTS?

Explain MTS Context ?

Why we need MTS?

Explain the Tx Supported by MTS?

Diff between “New”, “CreateObject” and ”CreateInstance”?

Explain ACID property?

Explain the Types of database read problems?

Why MSMQ Series?

What is DOM?

What is SAX?

When to use DOM/SAX?

Explain about Lex, Yacc , Flex and Bison?

Explain Overloading and Overridding ?

Explain the work carried by NEW operator?

Explain the usage of Pass By Reference?

Explain the Advantage of DAO?

Explian when to use ADO?


Explain in detail about DLL?

Explain the Types of creating a DLL?

Explain the types of DLL Linkages

Explain Diff between Extension DLL and Regular DLL

What dow lib, obj, dll and def file contain?

Explain Static Linking and Dynamic Linking ?

Explain about UNICODE?

What is XML?

What XML can & cannot do?

XML declaration is done by using a Tag

What does Well formed XML document mean ?

What does a valid XML document mean?

What is the Usage of XML ?

What is the purpose of DTD ?

Can we use a CSS file to format XML document ?

what does the tag <xml> do in HTML , what is the relevance

What is the usage of XML parser ?

Differentiate between SAX(Simple API for XML) and DOM (Document Object Model) ?

What kinds of SAX events are fired by the SAX parser?

When to use DOM ?

Which parser is the best fit ?

How to resolve duplication of names when 2 or more xml documents are used in an application?

What is a CDATA section?

Why XML Encoding is required ?

Name 2 HTML tags that are used to display XML data?


What is the purpose of DTD ?

Why use a DTD ?

What is an XML Schema?

Advantage of schemas over DTD ?

What is the root element of every schema ?

How to refer a schema in a XML ?

How to define simple elements in XSD ?

What are the available common types in XSD ?

How to assign default values to these common types in XSD ?

How to assign constant values that can not be changed ?

How to specify attributes that are mandatory ./ non-mandtory ? what is the key word used ?

How to set restricted/ acceptable values for XML elements or attibutes? What is the exact
terminology for this?

Advantage of schemas over DTD ?

How to make Restrictions on a Set of Values

How to set restrictions on a series of values ?

How to enforce restrictions on whitespace characters ?

What are the restrictions available on length ?

Differentiate between (maxExclusive,maxInclusive) also between(minExclusive,minInclusive)

Can a empty complex element contain attributes?

What is the restriction ?

What is the usage of <any> element in XSD

What is a XSL?

What is a XSLT?

How does XSLT work?

What is the root element in a XSL stylesheet

What is the use of “match” attribute ?


Why do I need to use a different XSLT namespace with Internet Explorer?

What's XPath got to do with XSLT?

How to connect an XML source document to an XSLT style sheet?

What is XPath (XML Path Language)?

What is an XPath node tree?

What is an XPath expression?

What is the relationship between XSLT and XPath?

How COM Is Different from C++ object?

Explain a typical interaction between a COM client and server?

Explain how DCOM works?

Things to do while working with DCOM

Explain Polymorphism?

Define Assert?

Define Trace?

Explain DeadLock ?

What is SOAP?

Explain Usecase?

Explain the Components of Usecase?

What is No-adhoc-Testcase?

How do you Estimate Cost?

Explain General Testing terms? (positive and negative)

Adv of Construct init instead of Assigning inside the constructor?

How will you minimize interface dependencies between A and B files?

What you will avoid doing when using with new operator?

Explain the Arch of MTS

Explain Types of Patterns?

What is the role of Software Architecture?


What are the types of scalability?

Explain reliability?

Explain Availability?

Explain Extensibility?

What is the difference between instance method and class method?

What is the difference between instance variable and class variable?

Can you instantiate an interface?

What is UML?

Who created UML?

Is UML a standard?

What can I use UML for?

Do I really need UML? Can't I just describe how my application is designed using regular words?

I already use project management software to plan my software development projects. Why should I
use UML?

Are there UML-based tools that I can use today?

What is a process?

What is an artifact?

Define the workflow available in UML?

Explain the diff between DBMS and RDBMS?

What does the new #import keyword do and why would I use it?

Should I use ATL's CComBSTR class or the native _bstr_t type?

Should I use ATL's smart pointers CComPtr or the native _com_ptr_ type?

Why should I use ATL instead of MFC when developing components?

Explain the Software Models in detail?

Define Baselining in a project?

Define Assert?
Define Verify ?

Explain Debug Vs Release ?

Explain the usage of Dump ?

What is an Exception ?

Define FireWall?

How can I establish a dynamic two-dimension array with the new operator?

How can I handle a destructor that fails?

How should I handle resources if my constructors may throw exceptions?

Why would I use a const variable / const identifier as opposed to #define?

Why is my executable so large?

How do I display text in the status bar using MFC?

What's the difference between C++ and Visual C++?

How do I convert a value (a number, for example) to a std::string?

How do I convert a std::string to a number?

Why can't the compiler find my header file in #include "c:\test.hpp" ?

What's the deal with operator overloading?

Can I overload operator== so it lets me compare two char[] using a string comparison?

Should I design my classes from the outside (interfaces first) or from the inside (data first)?

Can I use realloc() on pointers allocated via new?

Do I need to check for NULL after p = new Fred()?

Do I need to check for NULL before delete p?

What if I forget the [] when deleteing array allocated via new T[n]?

Is it legal (and moral) for a member function to say delete this?


What does "const Fred& x" mean?

Does "Fred& const x" make any sense?

What does "Fred const& x" mean?

What is a "const member function"?

What does "const int* p" means ?

When should my destructor be virtual?

How do I separate interface from implementation in C++?

What is a "pure virtual" member function?

How can I set up my member function so it won't be overridden in a derived class?

How can I tell if an integer is a power of two without looping?

Is the type of "pointer-to-member-function" different from "pointer-to-function"?

What is a "parameterized type"?

Explain the types of Marshalling and Define them ?

Give a good Example to explain marshalling?

Miscellaneous

main() main() main() #include<stdio.h>


{ { { main()
int x=10,y=15; int x=10,y=15; char *ptr = "Ramco Systems"; {
x=x++; int z=x++ * (*ptr)++; char
y=++y; ++y; printf("%s\n",ptr); //runtime s1[]="Ramco";
printf("%d cout<<z<<end error char
%d\n",x,y); l; ptr++; s2[]="Systems";
} cout<<x<<end printf("%s\n",ptr);//prints "amco s1=s2; // runtime
Ans: 11 and 16 l; Systems" error
} } printf("%s",s1);
Ans: 160 and 11 }
#include<stdio.h> output of the program?
What is the return value of scanf main() main()
statement? { {
output of the program? char *p1; int a=2, b=3;
char *p2; printf(" %d ", a+++b);
# define infiniteloop while(1) p1=(char *) malloc(25); }
main() p2=(char *) malloc(25); ans:5
{ strcpy(p1,"Ramco"); expl: here it evaluates
infiniteloop; strcpy(p2,"Systems"); as a++ + b.
printf("DONE"); strcat(p1,p2);
} printf("%s",p1); //prints "Ramco
Systems"
ans: none }
expl: infiniteloop in main ends with ";" . so
loop will not
reach end; and the DONE also will not
print.

You might also like