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

Just as an extension to my point in the previous post...
http://www.cplusplus.com/doc/tutorial/variables.html

the section fundamental datatypes in the above article
substantiates my point...

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the fastest c++ compiler?

798


What are the extraction and insertion operators in c++?

792


What is constructor in C++?

854


Is nan a c++?

890


What does int * mean in c++?

975


What does count ++ do in c++?

959


What are the general quetions are in DEna bank manager IT/System interviews?

1803


What do you mean by a template?

849


What are the types of array in c++?

838


Is java as fast as c++?

832


Are c and c++ different?

745


What are c++ files?

919


What is the exit function in c++?

773


What is the difference between an array and a list?

804


What is runtime polymorphism in c++?

858