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

If a function doesn’t return a value, how do you declare the function?

1002


What is runtime polymorphism in c++?

1084


Explain the difference between realloc() and free() in c++?

958


What is singleton pattern in c++?

919


How does java differ from c and c++?

923


What is the difference between global int and static int declaration?

948


How do you traverse a btree in backward in-order?

978


Why do we need constructors in c++?

1057


Why we use #include iostream in c++?

989


What is constructor in C++?

1013


What is a unnitialised pointer?

1013


What do you understand by pure virtual function? Write about its use?

951


Explain the difference between static and dynamic binding of functions?

996


Can we get the value of ios format flags?

1069


Give 10 points of differences between C & C++.

1084