Question discussion

In C++, a constructor

2143Medium DSSSB TGT Computer Science 0 replies 2 views
0

In C++, a constructor

  • Aalways has the return type void
  • Bmust be named main
  • Chas the same name as its class and no return type
  • Dis a member whose name begins with the symbol ~
Correct answer: C

Explanation

A constructor is a special member function with the class's name and no return type; a name starting with ~ denotes the destructor.

Discussion 0

Nobody has replied yet. Start the discussion!