What Is A Default Constructor in C++ ?



What Is A Default Constructor in C++ ?..

Answer / Bhawana Tripathi

A Default Constructor in C++ is a constructor that has no parameters and can be used to create default instances of a class when no other constructors are called. If not explicitly defined, the compiler will automatically generate a default constructor for a class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

What is conversion constructor in C++

1 Answers   TCS,


What's the value of the expression 5["abxdef"]?

1 Answers  


What is the difference between creating an object, using 'new' and using 'malloc'?

3 Answers   HFG, Siemens,


What is a class in C++?

2 Answers   Amazon, TCS, UGC Corporation,


explain the term 'resource acquisition is initialization'?

1 Answers   Amazon,


Declare a pointer to a function that takes a char pointer as argument and returns a void pointer.

1 Answers   Alter,


Can we call a virtual function from a constructor?

2 Answers  


Define an Abstract class in C++?

1 Answers  


What is Copy Constructor?

5 Answers   ABC, Siemens,


What is C++11?

2 Answers   Adobe,


Mention the default functions in C++, how would you detect that error has occurred inside the constructor and destructor.

1 Answers   Adobe,


Briefly explain various access specifiers in C++.

1 Answers   Amdocs,


Categories