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

How do you flush a buffer in c++?

1054


What is an adjust field format flag?

1066


write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.

2644


What is runtime polymorphism in c++?

1082


When do we use copy constructors?

1022


What is the use of structure in c++?

965


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

1139


Write a function to find the nth item from the end of a linked list in a single pass.

919


Explain the static storage classes in c++.

1193


Is map sorted c++?

939


give me an example for testing a program showing the test path .show how the test is important and complex.

2855


Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

1005


What is stack unwinding?

1056


What is the purpose of templates in c++?

983


What is switch case in c++ syntax?

1047