What is the difference in size of this two clasees?
Class A
{
int a;
char c;
float f;
}
Class B
{
float f;
char c;
int a;
}
Answer Posted / truong nguyen
1. No difference in size in this case. There will be
difference in size, however, if the class A and B are
defined below:
Class A
{
int a;
double d;
char c;
}
Class B
{
double d;
char c;
int a;
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Tell me can a pure virtual function have an implementation?
What are friend classes?
What operators can you overload in c++?
How to declare an array of pointers to integer?
Is swift better than c++?
Define a pdb file.
How can a struct in c++ differs from a struct in c?
Why pointer is used in c++?
What is the prototype of printf function?
the maximum length of a character constant can be a) 2 b) 1 c) 8
What is polymorphism & list its types in c++?
Out of fgets() and gets() which function is safe to use and why?
What is input operator in c++?
Define namespace in c++?
Is it possible for the objects to read and write themselves?