InterviewSolution
Saved Bookmarks
| 1. |
How the constructors and destructors can be differentiated?(a) Destructor have a return type but constructor doesn’t(b) Destructors can’t be defined by the programmer, but constructors can be defined(c) Destructors are preceded with a tilde (~) symbol, and constructor doesn’t(d) Destructors are same as constructors in syntaxI had been asked this question during an online interview.The origin of the question is Destructors topic in chapter Constructors and Destructors of Object Oriented Programming |
|
Answer» Correct option is (C) Destructors are preceded with a tilde (~) symbol, and constructor doesn’t |
|