Discussion
A class in C++ can have the following
Answer: C
A class can have Multiple CONSTRUCTORS and one DESTRUCTOR.
Constructors can be overloaded: a class may have a default constructor, parameterised constructors and a copy constructor, distinguished by their parameter lists. A destructor takes no arguments and cannot be overloaded, so a class has exactly one.
'One constructor' understates what overloading allows, and any option with multiple destructors is impossible, because ~ClassName() has a single fixed signature.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development