What is the difference between a constructor and a destructor in C++?
Answer / nashiinformaticssolutions
While a destructor is used to remove class objects, a constructor aids in initializing them. Both are invoked automatically: the constructor allocates memory instantly upon creating a new object, and the destructor deals with memory when destroying an existing one.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the latest c++ version?
Is set c++?
Explain the difference between static and dynamic binding of functions?
What is the default width for ouputting a long integer using the insertion operator?
What is the c++ code?
How can a struct in c++ differs from a struct in c?
What is istream c++?
What does scope resolution operator do?
what do you mean by volatile variable?
What is the importance of mutable keyword?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
What is the difference between inline functions and macros?