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;
return 0;
}
A) The program runs, but with no output.
B) 0
C) Hello!
D) The program will not compile.
Correct Answer:

Verified
Correct Answer:
Verified
Q10: More than one destructor function may be
Q18: One purpose that constructor functions are often
Q20: For the following code, which statement
Q20: A _ is a member function that
Q26: Whereas object-oriented programming centers around the object,
Q26: This type of member function may be
Q30: Objects in an array are accessed with
Q32: Assuming that Rectangle is a class name,
Q39: This is used to protect important data.<br>A)public
Q40: If you do not declare an access