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 < <

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

1 Expert Approved Answer
Step: 1 Unlock

The code presented in the image is a C program that includes a class CreateDestroy with a constructo... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!