Correct Answer: A destructor is automatically called when the object is destroyed A virtual destructor in C++ is used primarily to prevent resource leaks by performing a clean-up of the object
Correct Answer: All the features of C are similiar to C++ except some features, such as polymorphism, operator overloading which are supported in C++ but not in C language Both C and C++ language is similiar in their functionality but C++ provides with more tools and options
3. What are the basic concepts of object oriented programming?
Correct Answer: It is necessary to understand some of the concepts used extensively in object oriented programmingThese include Objects Classes Data abstraction and encapsulation Inheritance Polymorphism Dynamic Binding Message passing
Correct Answer: C++ is created by Bjarne Stroustrup of AT&T Bell Labs as an extension of C, C++ is an object-oriented computer language used in the development of enterprise and commercial applications Microsoft?s Visual C++ became the premier language of choice among developers and programmers
Correct Answer: In C++, void represents the absence of type, so void pointers are pointers that point to a value that has no type The void pointers can point to any data type You can declare void pointer as follows: void *p;
Correct Answer: ConstKeyword indicates that memory once initialized, should not be altered by a program Volatile keyword indicates that the value in the memory location can be altered even though nothing in the program Mutable keyword indicates that particular member of a structure or class can be altered even if a particular structure variable, class, or class member function is constant
Correct Answer: Dynamic binding (also known as late binding) means that the code associated with a given procedure call is not known until the time of the call at run timeIt is associated with polymorphism and inheritance