Vidyalelo
C++ Programming · Q76

Constructors and Destructors in C++

Programming · C++ Programming · question 76

Q76

What is the role of a constructor in classes?

A.
To modify the data whenever required
B.
To destroy an object
C.
To initialize the data members of an object when it is created
Answer
D.
To call private functions from the outer world

Answer: Option C

Solution

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