Ans : Overloading is a function or method performing additional task in addition to the normal task. i.e Same function handles more than one task. Overriding is a method is rewritten in the base class. In this is done using inheritance.

Ans : Class is a collection of data members and methods. Object is an instance of a class. In brief object is a memory space where all the data members and member functions will be loaded.

6 : What is memory leaking in C++ ?

Ans : A memory leak is the situation that occurs when dynamically allocation is used u\without handling properly.

7 : What are the things contains in .obj file ?

Ans : When a C++ program is compiled, the program will be executed and an object file is created which contains all data and suitable linking files in machine understandable language.

8 : In C++ have a default constructor?

Ans : Yes, compiler creates the default constructor only and only if the class doesn’t contain any constructor.

9 : What is inline function in C++?

Ans : Inline is a new topic in C++, When we initialize a function inline and call it in main() then instead of moving the control from calling function to called function, the function body will include at the function calling. Main purpose of Inline function is to improve the program performance. It is recommended not to use inline with long code programs.

10 : What is Dynamic memory allocation?

Ans : int m[10]={1,2,3,4};
In the above example occupied memory is 10*2 =20 bytes but actually we are using only 4*2 = 8 bytes so 12 bytes of memory is wasted. To stop this wastage of memory we use dynamic memory allocation concept. This will dynamically allocate the memory to the space we used. Syntax for Dynamic memory allocation: <pointer variable>=new <data type> [size of array];

11 : What is friend function in C++?

Ans : In C++ by default private data can assess only by members of that class but it is not possible to access outside the class functions. This is possible by friend function. friend function mean it is not a member of that class but can access private data of the class. Just you need to add friend in front of method.

12 : Which has more priority (.) or (*)?

Ans : Dot(.) operator has more priority than asterisk (*). Using brackets we can implicitly apply * for operands when needed.