Programming - C++ Language
You Are Here :: Home > C++ Language > Oops - General Questions
7. |
When are the Global objects destroyed?
|
A. |
When the control comes out of the block in which they are being used. |
B.
|
When the program terminates. |
C.
|
When the control comes out of the function in which they are being used.
|
D.
|
As soon as local objects die.
|
|
Answer: Option B
Explanation:
|
8. |
Copy constructor must receive its arguments by __________ .
|
A. |
either pass-by-value or pass-by-reference |
B.
|
only pass-by-value |
C.
|
only pass-by-reference
|
D.
|
only pass by address
|
|
Answer: Option C
Explanation:
|
9. |
A function with the same name as the class, but preceded with a tilde character (~) is called __________ of that class.
|
A. |
constructor |
B.
|
destructor |
C.
|
function
|
D.
|
object
|
|
Answer: Option B
Explanation:
|
10. |
To be called object-oriented, a programming language must allow
|
A. |
functions that return only a single value |
B.
|
#include files |
C.
|
inheritance
|
D.
|
All of the above
|
|
Answer: Option C
Explanation:
|
11. |
Paying attention to the important properties while ignoring inessential details is known as________
|
A. |
selectiveness |
B.
|
polymorphism |
C.
|
abstraction
|
D.
|
summarizing
|
|
Answer: Option C
Explanation:
|
12. |
A base class may also be called a
|
A. |
child class |
B.
|
subclass |
C.
|
derived class
|
D.
|
parent class
|
|
Answer: Option D
Explanation:
|
« prev
next »