Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

why all c++ program must have default constructor?

Answer Posted / sourisengupta

When you create a Object with no arguments, the compiler automatically creates a default constructor internally. But when you use parameterized constructor in your code then you need to provide the default constructor in your code so that the compiler does not throw any errors at compile time.

It also depends on compiler. some compiler also supports this feature. then you do not need to write default constructor in the code.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is const pointer and const reference?

1153


Write about the scope resolution operator?

1022


How much do coding jobs pay?

1004


How many standards of c++ are there?

1090


What will the line of code below print out and why?

733


Define a nested class.

1071


Write is a binary search tree? Write an algo and tell complexity?

1019


How do you define/declare constants in c++?

1042


Why cout is used in c++?

1024


What are advantages of using friend classes?

1068


How compile and run c++ program in turbo c++?

1171


What are static type checking?

1046


Is it possible for the objects to read and write themselves?

1092


What do you mean by ‘void’ return type?

1052


Is c++ a difficult language?

1109