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

What are c++ storage classes?

1070


How many characters are recognized by ANSI C++?

1376


which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

1154


Can recursive program be written in C++?

1203


What is searching? Explain linear and binary search.

964


What is else syntax in c++?

1148


What does scope resolution operator do?

1080


What is c++ in english?

1018


What is a c++ object?

1118


What can c++ be used for?

1060


How come you find out if a linked-list is a cycle or not?

1009


Can constructor be static in c++?

1075


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2545


Where are setjmp and longjmp used in c++?

1072


Why is c++ difficult?

1010