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 size of this class
class size
{
public:
char data1;
double d;
int data2;
char data3;
double data4;
short data5;
};

please explain the padding for these double variables.

Answer Posted / nivvy

This size is 32

Char : 1 + 3 bytes padding
Doube : 8 Bytes
int : 4 bytes
char : 1 + 3 bytes padding
double : 8 bytes
short : 4 bytes

so 32 bits

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by function pointer?

1069


What is a syntax in c++?

1128


what does the following statement mean? int (*a)[4]

1042


What is pointer -to-members in C++? Give their syntax?

1002


Why do we use structure in c++?

1028


Will a catch statement catch a derived exception if it is looking for the base class?

973


What is enum class in c++?

1204


How does list r; differs from list r();?

1112


Explain terminate() function?

1017


Explain the extern storage classes in c++.

1018


How are virtual functions implemented in c++?

1034


Explain how overloading takes place in c++?

1000


Explain one method to process an entire string as one unit?

1545


Does c++ have finally?

976


Describe about storage allocation and scope of global, extern, static, local and register variables?

1215