Multiple Choice
What is the output of the following program?
#include <iostream>
using namespace std;
class TestClass
{
Public:
TestClass(int x)
{ cout << x << endl; }
TestClass()
{ cout << "Hello!" << endl; }
};
int main()
{
TestClass test(77) ;
return 0;
}
A) the program runs but there is no output.
B) 77
C) Hello!
D) the program will not compile
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q1: A _ is a member function that
Q3: A private member function is useful for
Q4: The following code shows an example of
Q5: If a local variable and a global
Q6: When the body of a member function
Q7: You must declare all data members of
Q8: A class is a(n) _ that is
Q9: When a member function is defined outside
Q10: More than one destructor function may be
Q11: What is the output of the