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 / nikhil jain

Structures are value types; classes are reference types.
Structures use stack allocation; classes use heap
allocation.

A structure must have at least one nonshared variable or
event member; a
class can be completely empty.

Is This Answer Correct ?    4 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the indirection operator and the address of oper-ator?

1109


How do I download c++?

1005


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

1078


How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?

1035


If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?

1131


what is data encapsulation in C++?

1064


What is c++ prototype?

1206


What are the vectors in c++?

1030


Difference between delete and free.

1074


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

1050


Explain the static member function.

1179


When do you call copy constructors?

1145


What is the main use of c++?

1124


What are the advantages of c++ over c?

1068


Can user-defined object be declared as static data member of another class?

1021