Exercise: Constructors And Destructors

Questions for: Constructors And Destructors

It is a __________ error to pass arguments to a destructor.
A:
logical
B:
virtual
C:
syntax
D:
linker
Answer: C
No answer description is available. Let's discuss.
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: D
No answer description is available. Let's discuss.
If the copy constructor receives its arguments by value, the copy constructor would
A:
call one-argument constructor of the class
B:
work without any problem
C:
call itself recursively
D:
call zero-argument constructor
Answer: C
No answer description is available. Let's discuss.
Which of the following cannot be declared as virtual?
A:
Constructor
B:
Destructor
C:
Data Members
D:
Both A and C
Answer: D
No answer description is available. Let's discuss.
Constructors __________ to allow different approaches of object construction.
A:
cannot overloaded
B:
can be overloaded
C:
can be called
D:
can be nested
Answer: B
No answer description is available. Let's discuss.
Ad Slot (Above Pagination)
Quiz