Programming - C++ Language
You Are Here :: Home > C++ Language > constructor - General Questions
31. |
Which of the following is not a type of constructor?
|
A. |
Friend Constructor |
B.
|
Copy Constructor |
C.
|
Default Constructor
|
D.
|
Parameterized Constructor
|
|
Answer: Option A
Explanation:
|
32. |
Which of the following are NOT provided by the compiler by default?
|
A. |
Zero-argument Constructor |
B.
|
Destructor |
C.
|
Copy Constructor
|
D.
|
Copy Destructor
|
|
Answer: Option D
Explanation:
|
33. |
It is a __________ error to pass arguments to a destructor.
|
A. |
logical |
B.
|
virtual |
C.
|
syntax
|
D.
|
linker
|
|
Answer: Option C
Explanation:
|
34. |
If the programmer does not explicitly provide a destructor, then which of the following creates an empty destructor?
|
A. |
Preprocessor |
B.
|
Compiler |
C.
|
Linker
|
D.
|
main() function
|
|
Answer: Option B
Explanation:
|
35. |
A __________ is a constructor that either has no parameters, or if it has parameters, all the parameters have default values.
|
A. |
default constructor |
B.
|
copy constructor |
C.
|
Both A and B
|
D.
|
None of these
|
|
Answer: Option A
Explanation:
|
36. |
How many default constructors per class are possible?
|
A. |
Only one |
B.
|
Two |
C.
|
Three
|
D.
|
Unlimited
|
|
Answer: Option A
Explanation:
|
« prev
next »