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 are the extraction and insertion operators in c++? Explain with examples.

1102


What are maps in c++?

898


What is prototype for that c string function?

1070


I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?

2015


What's the most powerful programming language?

987


Why cout is used in c++?

973


How do I tokenize a string in c++?

1022


Can we use pointers in c++?

1000


What is rtti in c++?

1057


Describe new operator and delete operator?

1029


What is this pointer in c++?

1305


When do you call copy constructors?

1077


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1955


What is the difference between method overloading and method overriding in c++?

1080


List down the guideline that should be followed while using friend function.

1004