Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Technical Discussion :: C++

9. What is default constructor. Give example?

Answer:

A constructor that accepts no parameters is called the default constructor. The default constructor for class A is A::A ( ). If no such constructor is defined, then the compiler supplies a default constructor. Therefore a statement such as A a;
Invokes the default constructor of the compiler to create the object a.

Asked In :: Societe Generale

Post Your Answer Here:

Name *
Email
Alert me

Post Your Reply Here:

Report Error

Please Login First Click Here