C++ interview questions with answers

Site contains maximum number of possible c++ interview questions that can be asked in interviews....Kindly help us by clicking any one ad in my site which will give us some money to improve our site !!!!

Answer:Use Case is a description of a set of sequence of actions that a system performs that yields an observable result of value to a particular action. In SSAD process <=> In OOAD USECASE. It is represented elliptically.

C++ interview question :Can we generate a C++ source code from the binary file?
Answer: Technically this is possible, but in my knowledge their no such software available yet. Why this is possible? In program flow we do like this to generate binary file. High level language programming code -low level programming code- hex code- binary code. How we can do reverse can be illustrated with this example. When I type 0 on screen the ASCII equivalent is 65 and so the binary code will be by converting 65 (01010 0101) so I can recognize this and decode this. Same technique can be used. Some secret mission defense org. I heard have this code splitter from binary to assembly language (low level language)/ Converter type devices available, they use them for secret national purpose.

C++ interview question : What is a memory leak? How can we avoid it?

Answer :A memory leak can be avoided by making sure that whatever memory has been dynamically allocated will be cleared after the use of the same. for example

Answer: Friend classes are used when two or more classes are designed to work together and virtual base class aids in multiple inheritance

C++ interview question:Why does the function arguments are called as "signatures"? Answer: The arguments distinguish functions with the same name (functional polymorphism). The name alone does not necessarily identify a unique function. However, the name and its arguments (signatures) will uniquely identify a function.In real life we see suppose, in class there are two guys with same name, but they can be easily identified by their signatures. The same concept is applied here.

ex: class person
{
public:
char getsex();
void setsex(char);
void setsex(int);
};
In the above example we see that there is a function setsex() with same name but with different signature.