What is a Default constructor?

Answer Posted / munendra kumar

A constructor that has no arguments.

If you don't code one, the compiler provides one if there are no other constructors. If you are going to instantiate an array of objects of the class, the class must have a default constructor.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should we use container classes instead of arrays?

674


Can manipulators fall in love?

649


What is the use of pointer in c++ with example?

642


Is it possible for a member function to use delete this?

654


What is a c++ class?

716






Is vector a class in c++?

691


Define macro.

695


What do you mean by vtable and vptr in c++?

721


List the merits and demerits of declaring a nested class in C++?

692


What are mutator methods in c++?

748


What is the prototype of printf function?

750


What is token c++?

663


Write some differences between an external iterator and an internal iterator?

677


Describe linked list using C++ with an example.

750


What are the basic data types used in c++?

658