Vidyalelo
C++ Programming · Q4

Classes and Objects in C++

Programming · C++ Programming · question 4

Q4

What is the purpose of a constructor in C++?

A.
To hide the implementation details of a class
B.
To create multiple instances of a class
C.
To initialize the object's data members
Answer
D.
To destroy the object

Answer: Option C

Solution

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