Which among the following is correct?

A class student{ public: int student(){} };
B class student{ public: void student (){} };
C class student{ public: student{}{} };
D class student{ public: student(){} };

Correct Answer: class student{ public: student(){} };

The constructors must not have any return type. Also, the body may or may not contain any body. Defining default constructor is optional, if you are not using any other constructor.

Related Questions

Who among the following initiated reforms among Muslims?

Next steps