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 / guest

(1)Class Design For Object , Struct Design For Value Thus
Class is Refrence Type (Heape) but Struct is Value Type
(Stack) And Thus Struct is Faster Than Class ,

(2) Class is not Accessable Meanning We Can Access it By
Object , Struct is Accessable Meanning We Can Access it By
Value (Varible).

(3) Class Support Inheritance , Struct Not Support Inheritance .

(4)Class id Added Behavior (Methods) , Struct Not Added
Behavior

(5)Class Exist at higher Level of the Program , Struct Exist
at Lowest Level of the Program .

(6) A struct cannot declare a default constructor (a
constructor without parameters) or a destructor.Class Can .

(7)a small class may be more efficiently handled by the
system if you declare it as a struct instead.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an incomplete type in c++?

1284


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

1211


What is the full form of dos?

1170


What do you know about near, far and huge pointer?

1143


What is else syntax in c++?

1210


Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort

1059


What do the header files usually contains?

1055


What gives the current position of the put pointer?

1002


How a modifier is similar to mutator?

1185


Is c++ a good first language to learn?

1073


Define a conversion constructor?

1101


Can a function take variable length arguments, if yes, how?

1016


How do you master coding?

1040


What is abstraction in c++?

1362


What is the difference between prefix and postfix versions of operator++()?

1086