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 there is no output.
B) 0
C) Hello!
D) the program will not compile
Correct Answer:

Verified
Correct Answer:
Verified
Q43: While a class's member functions may be
Q44: Where are class declarations usually stored?<br>A) on
Q45: Which of the following is automatically called
Q46: Class objects can be defined prior to
Q47: For the following code, which statement is
Q49: When a constructor has a member initialization
Q50: The destructor function's return type is<br>A) int<br>B)
Q51: Which of the following is a directive
Q52: Destructor functions are often used to free
Q53: Objects in an array are accessed with