Multiple choice

In the above program, which is/are the possible reason(s) for not generating the output?

Class A
{
public: void display()
{
printf("This is class A");
}
};
void main()
{
A a1; a1.display();
getch();
}

  1. Use of printf in class A

  2. C++ use cout<< operator to display the text on screen.

  3. Function definition can always be done outside the class.

  4. Function calling can be done by using the name of the function.

  5. Both (1) and (2)

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Options (1) and (2) correctly explain the reason.