Solved

What Is the Output of the Following Program?
#Include ≪iostream> \quad

Question 48

Multiple Choice

What is the output of the following program?
#include <iostream>
using namespace std;
class TestClass
{
Public:
\quad TestClass(int x)
\quad { cout << x << endl; }
\quad TestClass()
\quad { cout << "Hello!" << endl; }
};
Int main()
{
\quad TestClass test;
\quad return 0;
}


A) the program runs but there is no output.
B) 0
C) Hello!
D) the program will not compile

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions