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 are the comments in c++?

989


What is the difference between global variables and local variable

1066


What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?

1058


What is c++ manipulator?

989


What is a c++ vector?

1057


How long will it take to learn programming?

1064


Why should you learn c++?

1026


Explain binary search.

989


How would you obtain segment and offset addresses from a far address of a memory location?

1080


What is capacity in vector in c++?

1017


What does it mean to declare a member function as static?

1065


What is microsoft c++ redistributable 2013?

1105


What is the basic of c++?

1062


What are 2 ways of exporting a function from a dll?

1202


What do you mean by inheritance in c++? Explain its types.

1152