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

whats the size of class EXP on 32 bit processor?
class EXP
{
char c1;
char c2;
int i1;
int i2;
char *ptr;
static int mem;
};

Answer Posted / shrinidhi

20 bytes.
static is given memory in heap.
for 1st two data members c1 and c2 compiler will take 4
bytes cz of padding.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

1041


Explain binary search.

995


What is difference between c++ 11 and c++ 14?

1103


Which is most difficult programming language?

1112


Write a short code using c++ to print out all odd number from 1 to 100 using a for loop

1032


Do you need a main function in c++?

1127


Write about c++ storage classes?

1202


What is c++ and its features?

1020


What is a float in c++?

990


How a new element can be added or pushed in a stack?

1022


Is there any difference between int [] a and int a [] in c++?

1027


What is the full form of c++?

1355


What are member functions used in c++?

1154


What are the rules for naming an identifier?

1065


What are the various compound assignment operators in c++?

985