Top C++ General Interview Questions :: ALLInterview.com http://www.allinterview.com Top C++ General Interview Questions en-us difference between c and c++? http://www.allinterview.com/showanswers/69378.html =>c does not a class/object concept =>c++ provides data encapsulation,data abstraction,polymorphism. =>c++ support all c syntax =>in c passing value to a function is "call by value" where c++ its "call What is the Maximum Size that an Array can hold? http://www.allinterview.com/showanswers/18006.html Infinity Difference between Overloading and Overriding? http://www.allinterview.com/showanswers/241.html Overloading - Two functions having same name and return type, but with different type and/or number of arguments. Overriding - When a function of base class is re-defined in the derived class. what is data Abstraction? and give example http://www.allinterview.com/showanswers/66313.html data abstraction is a process of representing the essential features without including implementation details. What is Pure Virtual Function? Why and when it is used ? http://www.allinterview.com/showanswers/4854.html The abstract class whose pure virtual method has to be implemented by all the classes which derive on these. Otherwise it would result in a compilation error. This construct should be used when one wants to ensure that all the derived classes What is the Difference between &quot;vector&quot; and &quot;array&quot http://www.allinterview.com/showanswers/10567.html a vector is also like an array i.e sequentially accessed but we can increase/decrease size of a vector in a simple way than it is done for arrays. What is the difference between public, private, protected inheritanc http://www.allinterview.com/showanswers/410.html public-->inherite the protected members as preotected in drived class and pubic members wiull be public in derived class protected--->pubic and protecated members of the base class will become protected in derived class Private--> write program for palindrome http://www.allinterview.com/showanswers/70394.html #include<stdio.h> #include<conio.h> void main() { int n,s=0,m; clrscr(); printf("enter any no"); scanf("%d",&n); m=n; while(n>0) { r=n%10; s=s*10+r; n=n/10; } if(m==n) printf("the no is pali What are advantages and disadvantages of Design patterns? http://www.allinterview.com/showanswers/35464.html Benefits: 1. enable large scale reuse of S/W 2. Helps in improve developer communication 3. capture expert knowledge and design trade-offs and make expertise widely available Drawbacks: 1.Do not lead to direct code reuse 2. Complex in nat Difference between delete and delete[]? http://www.allinterview.com/showanswers/879.html When we want to free a memory allocated to a pointer to an object then "delete" is used. Ex int * p; p=new int; // now to free the memory delete p; But when we have allocated memory for array of objects like int * p= new int(10) when can we use virtual destructor? http://www.allinterview.com/showanswers/244.html It is used whenever a base class pointer is pointing to its derived class.In such a case when a user tries to delete the base class pointer then it results in deallocating the memory occupied by the base class.Therefore instead the derived class What is the difference between Class and Structure? http://www.allinterview.com/showanswers/246.html The difference between a class and a structure is that, by default, all of the members of a class are private and, by default, all of the members of a structure are public. Difference between static global and global? http://www.allinterview.com/showanswers/862.html there is no any diffrence between static and non static global variable What is the output of printf(&quot;%d&quot;)? http://www.allinterview.com/showanswers/10555.html it is used to print one integer data type value. What is the difference between a copy constructor and an overloaded http://www.allinterview.com/showanswers/470.html A copy constructor constructs a new object by using the content of the argument object. An overloaded assignment operator assigns the contents of an existing object to another existing object of the same class.