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...

What is the difference between Class and Structure?

Answer Posted / sundarchum

Structs are Value type. They are stored as a stack on
memory.
Class is reference type. They are stored as heap on memory.
Sturcts constructor must contain a parameter and cannot
have default constructor.
Class constructor may contain no parameter.
Struct cannot have instance field.
Class can have instance field.
Struct cannot inherit from a structure.
Class can inherit from a class.
Structs cannot declare a destructor.

Is This Answer Correct ?    101 Yes 49 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best c++ compiler?

1162


Show the declaration for a static function pointer.

1048


What is array give example?

1051


What are references in c++? What is a local reference?

1046


Will this c++ program execute or not?

1095


What do you mean by translation unit?

1097


Do class declarations end with a semicolon?

1083


Write a code/algo to find the frequency of each element in an array?

1122


Is main a class in c++?

1005


How can I learn dev c++ programming?

1050


What is c++ stringstream?

1106


What are associate containers?

1025


What is the difference between a baller and a reference in C++?

1124


You want to link a c++ program to c functions. How would you do it?

1002


What is the difference between C and CPP?

1161