Question: Given the class definition: CreateDestroy class { public: CreateDestroy() { cout < < constructor called, ; } ~CreateDestroy() { cout < < destructor called,
Given the class definition: CreateDestroy class { public: CreateDestroy() { cout < < "constructor called, "; } ~CreateDestroy() { cout < < "destructor called, "; } What will the following program output? int main() { CreateDestroy c1; CreateDestroy c2; return 0; |} a. constructor called, destructor called, constructor called, destructor called, b. constructor called, destructor called, c. constructor called, constructor called, d. constructor called, constructor called, destructor called, destructor called, 12:29 am
Step by Step Solution
There are 3 Steps involved in it
The code presented in the image is a C program that includes a class CreateDestroy with a constructo... View full answer
Get step-by-step solutions from verified subject matter experts
