What will the following program output?

Given the class definition:
class CreateDestroy
{
public:
CreateDestroy() {cout <<"constructor called,"}
~CreateDestroy() {cout <<"destructor called, "}
};


int main()
{
for (int i = 1; i <= 2; ++i) {
CreateDestroy cd;
}
return 0;
}
a. constructor called, destructor called, constructor called, destructor called,
b. constructor called, constructor called,
c. constructor called, constructor called, destructor called, destructor called,
d. Nothing.


a. constructor called, destructor called, constructor called, destructor called,

Computer Science & Information Technology

You might also like to view...

If TAX_RATE is a named constant of type Decimal, which of the following statements is valid?

(A) TAX_RATE += 1 (B) dblVar = TAX_RATE + 1 (C) TAX_RATE = 2 * TAX_RATE (D) All of the above

Computer Science & Information Technology

The XHTML element used to create a radio button or a button is the ________ element

Fill in the blank(s) with correct word

Computer Science & Information Technology

The ________ command is one of the most commonly used command-line commands. It can be used to check IP connectivity between two network devices

A) ping B) ipconfig C) netstat D) nbtstat

Computer Science & Information Technology

When you apply symbolism tools to mixed symbol instance sets, the only symbol instances that will be modified are those that are linked to the selected symbols in the Symbols panel.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology