Question-71. Which key word is used to perform unconditional branching ?

Answer- goto.

 

Question-72. What is the purpose of #undef preprocessor ?

Answer- It will be used to undefine an existing macro definition.

 

Question-73. What is virtual destructor ?

Answer- A virtual destructor ensures that the objects resources are released in the reverse order of the object being constructed w.r.t inherited object.

 

Question-74. What is the order of objects destroyed in the memory ?

Answer- The objects are destroyed in the reverse order of their creation.

 

Question-75. What is a friend class ?

Answer- A class members can gain accessibility over other class member by placing the class declaration prefixed with the keyword ‘friend’ in the destination class.

 

Question-76. What is C++ ?

Answer- C++ is an object oriented programming language created by Bjarne Stroustrup. It is released in 1985.

 

Question-77. What are the advantages of C++ ?

Answer- C++ doesn’t only maintains all aspects from C language, it also simplify memory management and add several features like:

Includes a new datatype known as a class.
Allows object oriented programming.

 

Question-78. What is the difference between C and C++ ?

Answer-

C C++
1) C follows the procedural style programming. 1) C++ is multi-paradigm. It supports both procedural and object oriented.
2) Data is less secured in C. 2) In C++, you can use modifiers for class members to make it inaccessible for outside users.
3) C follows the top-down approach. 3) C++ follows the bottom-up approach.
4) C does not support function overloading. 4) C++ supports function overloading.
5) In C, you can’t use functions in structure. 5) In C++, you can use functions in structure.
6) C does not support reference variables. C++ supports reference variables.
7) In C, scanf() and printf() are mainly used for input/output. 7) C++ mainly uses stream cin and cout to perform input and output operations.

 

 

Question-79. What is the difference between reference and pointer ?

Answer-


Reference Pointer
1) References are less powerful than pointers. Once a reference is created, it can’t refer to other object later. 1) Pointers provide the powerful facilities than references.
2) References are safer and easier to use than pointers. 2) Pointers are comparatively difficult to use.

 

 

Question-80. What is the first string in the argument vector w.r.t command line arguments ?

Answer- Program name.