[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.
Technical Discussion :: C++

3 / 187

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:


Rate This: +0 -0     
Report    

Post Your Reply Here:

Alert me
q4i-reply-your-answer

Report Error

Please Login First Click Here

Most Popular Qs.