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 / p govind rao

1) structure :- In structure have a by default public.
In class have a by default private.
2) Structure cannot be inherited. But class can be
inherit.
3) There is no data hiding features comes with
structures. Classes do, private, protected and public.
4) A structure can't be abstract, a class can.
5) A structure is a value type, while a class is a
reference type.
6) A structure is contain only data member , but class
contain data member and member function.
7) In a Structure we can't initilse the value to the
variable but in class variable we assign the values.
8) Structure are value type, They are stored as a
stack on memory. where as class are reference type. They
are stored as heap on memory.

Is This Answer Correct ?    597 Yes 96 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better turbo c++ or dev c++?

1072


Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.

6403


Should I learn c or c++ or c#?

1003


What is object in c++ example?

1105


What is late binding c++?

984


If a header file is included twice by mistake in the program, will it give any error?

1041


What is a pdb file?

994


Differentiate between an array and a list?

1176


Describe protected access specifiers?

1217


Is c++ map a hash table?

1019


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

1055


What it is and how it might be called (2 methods).

1179


What is the best free c++ compiler for windows?

1108


Write a program which uses Command Line Arguments

1175


What is the difference between an external iterator and an internal iterator?

1098