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 an incomplete type in c++?

975


What are libraries in c++?

802


What is data binding in c++?

716


Is eclipse good for c++?

779


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

810


What is a tuple c++?

749


What is the use of c++ programming language in real life?

779


Is c++ low level?

796


What is the difference between public, private, and protected access?

813


What is fflush c++?

775


What is null pointer and void pointer?

828


What are the various compound assignment operators in c++?

727


Write a recursive program to calculate factorial in c++.

818


Why is c++ considered difficult?

831


What is vector processing?

916