Tell me what are the restrictions apply to constructors and destructors?
Submitted by: AdministratorThe 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.
Submitted by: Administrator
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.
Submitted by: Administrator
Read Online C++ Constructors Job Interview Questions And Answers
Top C++ Constructors Questions
☺ | Which of the following are NOT provided by the compiler by default? |
☺ | If the programmer does not explicitly provide a destructor, then which of the following creates an empty destructor? |
☺ | Constructors __________ to allow different approaches of object construction. |
☺ | What is shallow? |
☺ | It is a __________ error to pass arguments to a destructor. |
Top C Plus Plus Language Categories
☺ | C++ Pointers & Functions Interview Questions. |
☺ | C++ Operator Overloading Interview Questions. |
☺ | C++ Exception Handling Interview Questions. |
☺ | C++ Template Interview Questions. |
☺ | C++ Virtual Functions Interview Questions. |