Programming - C++ Language
You Are Here :: Home > C++ Language > Oops - General Questions
43. |
When following piece of code is executed, What is the output? b = 3; a = b++;
|
A. |
value of a is 4 and value of b is 4 |
B.
|
value of a is 3 and value of b is 4 |
C.
|
value of a is 4 and value of b is 3
|
D.
|
value of a is 3 and value of b is 3
|
|
Answer: Option B
Explanation:
|
44. |
Choose the correct option. cout is a/an __________ .
|
A. |
Function |
B.
|
Operator |
C.
|
Object
|
D.
|
Macro
|
|
Answer: Option C
Explanation:
|
45. |
By default the visibility of the members of a class is
|
A. |
Public |
B.
|
Private |
C.
|
Protected
|
D.
|
None
|
|
Answer: Option B
Explanation:
|
46. |
virtual functions is used for
|
A. |
Overloading |
B.
|
Overriding |
C.
|
Static Binding
|
D.
|
Dynamic Binding
|
|
Answer: Option D
Explanation:
|
47. |
What will happen if a class is not having any name?
|
A. |
It cannot have a destructor. |
B.
|
It cannot have a constructor. |
C.
|
It is not allowed.
|
D.
|
Both A and B.
|
|
Answer: Option D
Explanation:
|
48. |
Which of the following type of class allows only one object of it to be created?
|
A. |
Virtual class |
B.
|
Abstract class |
C.
|
Singleton class
|
D.
|
Friend class
|
|
Answer: Option C
Explanation:
|
« prev
next »