Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

UGC-NET | UGC NET CS 2016 July – III | Question 37

  • Last Updated : 12 Nov, 2020

Implicit return type of a class constructor is:
(A) not of class type itself
(B) class type itself
(C) a destructor of class type
(D) a destructor not of class type

Answer: (B)

Explanation: Truly, constructor doesn’t have any return type not even void.
However, as the definition of Constructor goes, it is used to initialize an object of the class. So implicitly, they return the current instance of the class whose constructor it is.
Therefore, Implicit return type of a class constructor is class type itself.

For more information Refer:C++ Classes and Objects
Option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :