C++ Constructors Question: Download Questions PDF
Tell me what are the restrictions apply to constructors and destructors?
Answer:
The following restrictions apply to constructors and destructors
Constructors and destructors don't return values.
The addresses of constructors and destructors can't be taken so we can't use references and pointers on them.
Constructors cannot be declared with the keyword virtual.
Constructors and destructors cannot be declared static, const, or volatile.
Constructors and destructors don't return values.
The addresses of constructors and destructors can't be taken so we can't use references and pointers on them.
Constructors cannot be declared with the keyword virtual.
Constructors and destructors cannot be declared static, const, or volatile.
Download C++ Constructors Interview Questions And Answers
PDF
Previous Question | Next Question |
What is deep copy? | Can you please explain the order in which constructors are called when an object of a derived class is created? |