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

Why do we use constructor?

821


State the difference between delete and delete[].

790


Define the process of error-handling in case of constructor failure?

782


What is the copy-and-swap idiom?

817


Which software is used to run c++ program?

724


What is the rule of three?

764


Explain function overloading and operator overloading.

821


What is a storage class used in c++?

814


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

815


What is an arraylist c++?

900


What is difference between rand () and srand ()?

827


Briefly describe a B+ tree. What is bulk loading in it?

989


What are the rules for naming an identifier?

771


What is general format for a prototype?

794


What do you mean by delegate? Can a user retain delegates?

728