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 are the advantages of using pointers in a program?

1092


How would perform Pattern Matching in C++?

1168


In the derived class, which data member of the base class are visible?

1066


Will the following program execute?

990


Which function cannot be overloaded c++?

1047


How does c++ structure differ from c++ class?

1051


What is a constructor in c++ with example?

1066


Explain virtual class?

964


Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.

1012


Is c++ double?

976


Why do you use the namespace feature?

1044


Write a program to add three numbers in C++ utilizing classes.

1054


Are c and c++ similar?

993


Differentiate between the message and method in c++?

1006


What is fixed in c++?

983