Page 1 of 1

Which of the following represents the correct explicit call to a constructor of class A?

Posted: Wed Jul 13, 2022 7:52 pm
by answerhappygod
class A{
int a;
public:
A(int i)
{
a = i;
}
}
a) A a(5);
b) A a;
c) A a = A(5);
d) A a = A();