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

an operation between an integer and real always yeilds a) integer result b) real result c) float result

1213


What is friend class in c++ with example?

1116


What is polymorphism in c++? Explain with an example?

1102


What are the uses of typedef in a program?

1132


How many keywords are used in c++?

1063


What is singleton pattern in c++?

1047


What do the keywords volatile and mean mutable?

1093


What is a static member?

1092


What new()is different from malloc()?

1162


Ask to write virtual base class code?

2801


How to defines the function in c++?

1215


What happens when the extern "c" char func (char*,waste) executes?

1128


How many namespaces are there in c++?

1122


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

1100


Explain the concept of friend function in c++?

1161