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 with no output.
B) 77
C) Hello!
D) The program will not compile.
Correct Answer:

Verified
Correct Answer:
Verified
Q11: This directive is used to create an
Q12: One purpose that destructor functions are often
Q13: The constructor function's return type is<br>A) int<br>B)
Q14: This type of member function may be
Q15: When a member function is defined outside
Q16: This is automatically called when an object
Q29: Examples of access specifiers are the key
Q30: A destructor function can have zero to
Q37: If you do not declare a destructor
Q45: When the body of a member function