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
What is the use of setfill in c++?
What is the precedence when there is a global variable and a local variable in the program with the same name?
How do you clear a buffer in c++?
What do you mean by public protected and private in c++?
If a header file is included twice by mistake in the program, will it give any error?
What is a lambda function c++?
What do you understand by pure virtual function? Write about its use?
Why should we use null or zero in a program?
the first character in the variable name must be an a) special symbol b) number c) alphabet
What is microsoft c++ redistributable?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
What is difference between n and endl in c++?
In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....
How long it will take to learn c++?
What is a c++ class?