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
Write about the use of the virtual destructor?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
Why use of template is better than a base class?
What are vtable and vptr?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
Do you know what are pure virtual functions?
How the delete operator differs from the delete[]operator?
Are strings immutable in c++?
Is ca high or low level language?
What is the difference between map and hashmap in c++?
What is abstract class in c++?
What is basic if statement syntax?
How many static variables are created if you put one static member into a template class definition?
What are the differences between the function prototype and the function defi-nition?
Is std :: string immutable?