adplus-dvertising
frame-decoration

Question

What will be the output of the program given below:
class A
{
 Public : A(int a=0)
 { 
  cout<<”new A”;
        }
};
A a;
A b;
A c;

a.

new A new A new A

b.

newAnewAnewA

c.

new Anew Anew A

d.

new A new Anew A

Answer: (c).new Anew Anew A

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the program given below: