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...

How size of a class can be calulated?

Answer Posted / shweta iyer

Size of a class can be calculated by adding up the size of all its data members.

For example:
class student
{
char name[20]; -----> 4*20=80
int rollno[5]; -----> 2*5=10
......
}

So size of class student is 80+10=90.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a vector c++?

1250


What is jump statement in C++?

1209


What are exceptions c++?

1112


What does count ++ do in c++?

1254


What is a binary file? List the merits and demerits of the binary file usagein C++.

1369


How do I exit turbo c++?

1120


What is meaning of in c++?

1292


What is function overloading in C++?

1493


State the difference between delete and delete[].

1165


What is a c++ class?

1151


What are vectors used for in c++?

1142


What is the difference between *p++ and (*p)++ ?

1410


How is static data member similar to a global variable?

1168


Is dev c++ free?

1101


Tell me can a pure virtual function have an implementation?

1100