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
Explain how to initialize a const data member.
What is the difference between *p++ and (*p)++ ?
What does I ++ mean in c++?
Explain the benefits of proper inheritance.
What does std :: flush do?
Is c++ proprietary?
Explain rtti.
Explain what are accessor methods?
what are function pointers?
What are vectors used for in c++?
What does count ++ do in c++?
What is the use of 'this' pointer?
What is a c++ vector?
What are the various situations where a copy constructor is invoked?
Write a program to concatenate two strings.