Given the class definition: class CreateDestroy
{
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,
Correct Answer:
Verified
Q9: Given the class definition: class CreateDestroy
{
Public:
CreateDestroy() {cout
Q10: Which of the following is not true
Q11: A class-scope variable hidden by a block-scope
Q12: Variables defined inside a member function of
Q13: Which of the following statements is false
Q15: Every object of the same class:
A) Gets
Q16: Which of the following statements is false?
A)
Q17: Which of the following is not true
Q18: Which of the following preprocessor directives does
Q19: If a member function of a class
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents