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++

93 / 184

What is default constructor. Give example?


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:

Rate This: +0 -0     

Post Your Reply Here:

Alert me

Report Error

Please Login First Click Here

Most Popular Qs.