Programming - C++ Language
You Are Here :: Home > C++ Language > Oops - General Questions
37. |
Pure virtual functions
|
A. |
have to be redefined in the inherited class. |
B.
|
cannot have public access specification. |
C.
|
are mandatory for a virtual class.
|
D.
|
None of the above.
|
|
Answer: Option A
Explanation:
|
38. |
Additional information sent when an exception is thrown may be placed in
|
A. |
the throw keyword. |
B.
|
the function that caused the error. |
C.
|
the catch block.
|
D.
|
an object of the exception class.
|
|
Answer: Option C
Explanation:
|
39. |
Use of virtual functions implies
|
A. |
overloading. |
B.
|
overriding. |
C.
|
static binding.
|
D.
|
dynamic binding.
|
|
Answer: Option D
Explanation:
|
40. |
Within a switch statement
|
A. |
Continue can be used but Break cannot be used |
B.
|
Continue cannot be used but Break can be used |
C.
|
Both Continue and Break can be used
|
D.
|
Neither Continue nor Break can be used
|
|
Answer: Option B
Explanation:
|
41. |
Data members which are static
|
A. |
cannot be assigned a value |
B.
|
can only be used in static functions |
C.
|
cannot be defined in a Union
|
D.
|
can be accessed outside the class
|
|
Answer: Option B
Explanation:
|
42. |
The members of a class, by default, are
|
A. |
public |
B.
|
protected |
C.
|
private
|
D.
|
mandatory to specify
|
|
Answer: Option C
Explanation:
|
« prev
next »