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 |
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
Why would you use pointers in c++?
What is flush c++?
To which numbering system can the binary number 1101100100111100 be easily converted to?
What is a .h file c++?
How do you allocate and deallocate memory in C++?
Where must the declaration of a friend function appear?
What is the last index number in an array of 100 characters a) 100 b) 99 c) 101
What is the Maximum Size that an Array can hold?
55 Answers Adobe, FutureSoft, HCL, Infosys, Satyam, TCS, Wipro,
What is the difference between static global and global ?
What is the use of map in c++?
Differentiate between structure and class in c++.