Examveda

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

A. Constructor is called explicitly when an object is created, while a member function is called automatically

B. Constructor has a return type, while a member function does not

C. Constructor is called automatically when an object is created, while a member function needs to be called explicitly

D. Constructor can be overloaded, while a member function cannot

Answer: Option C


Join The Discussion

Related Questions on Classes and Objects in C plus plus