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

absolutely correct navvy agreed !!

just a minor change

short : 2 bytes + 2 byte padding

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c++ a good beginners programming language?

1015


What is a volatile variable in c++?

1368


What are the important differences between c++ and java?

1091


What is recursion?

1944


What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?

1053


What is the use of string in c++?

979


Differentiate between the message and method in c++?

1010


Is c++ still in demand?

1109


Describe the setting up of my member functions to avoid overriding by the derived class?

1073


What is time h in c++?

1082


What are the advantages of c++? Explain

1009


What is a buffer c++?

995


Why do we need function?

1006


what is c++

2314


How do you initialize a string in c++?

943