Choose two answers for this question.
Analyze the following code:
#include <iostream>
using namespace std;
class A
{
public:
int s;
A(int newS)
{ s = newS; }
void print()
{ cout << s; }
};
int main()
{
A a;
a.print();
}
D. The program would compile and run if you change A a to Aa(5).
C. The program has a compilation error because class A does nothave a default constructor.
B. The program compiles and runs fine and prints nothing.
A. The program has a compilation error because class A is not apublic class.
Answer
C. The program has a compilation
OR
OR