Vidyalelo
C++ Programming · Q17

Constructors and Destructors in C++

Programming · C++ Programming · question 17

Q17

What is the difference between a constructor and a normal member function in C++?

A.
Constructor can be overloaded, while a member function cannot
B.
Constructor has a return type, while a member function does not
C.
Constructor is called explicitly when an object is created, while a member function is called automatically
D.
Constructor is called automatically when an object is created, while a member function needs to be called explicitly
Answer

Answer: Option D

Solution

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