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 / abhishek
absolutely correct navvy agreed !!
just a minor change
short : 2 bytes + 2 byte padding
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Is c++ a good beginners programming language?
What is a volatile variable in c++?
What are the important differences between c++ and java?
What is recursion?
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
What is the use of string in c++?
Differentiate between the message and method in c++?
Is c++ still in demand?
Describe the setting up of my member functions to avoid overriding by the derived class?
What is time h in c++?
What are the advantages of c++? Explain
What is a buffer c++?
Why do we need function?
what is c++
How do you initialize a string in c++?