Vidyalelo
C++ Programming · Q64

Constructors and Destructors in C++

Programming · C++ Programming · question 64

Q64

Which of the following represents the correct explicit call to a constructor of class A? class A int a; public: A(int i) a = i;

A.
A a(5);
B.
A a;
C.
A a = A(5);
Answer
D.
A a = A();

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board