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?

Answers were Sorted based on User's Feedback



How size of a class can be calulated?..

Answer / spoorthi.hebbar

THE SIZE OF THE ATTRIBUTES OF CLASS IS THE ANSWER..

EG.
CLASS DEMO
{
INT A; //IT IS 4 BYTES LONG
INT B; //IT IS 4 BYTES LONG
}
THE TOTAL SIZE IS 8 BYTES.

Is This Answer Correct ?    8 Yes 2 No

How size of a class can be calulated?..

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

More C++ General Interview Questions

Is c++ a high level language?

0 Answers  


Write a corrected statement in c++ so that the statement will work properly. x =+ 7;

2 Answers  


What is the best c++ ide?

0 Answers  


How a modifier is similar to mutator?

0 Answers  


Is c++ a dying language?

0 Answers  


What you mean by early binding and late binding? How it is related to dynamic binding?

1 Answers  


How should a contructor handle a failure?

0 Answers  


what is oops

2 Answers  


What is an ABC: an "Abstract Base Class"?

1 Answers  


Give 2 examples of a code optimization?

4 Answers  


What is the main purpose of c++?

0 Answers  


Distinguish between new and malloc and delete and free().

0 Answers  


Categories