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
Why c++ is so important?
How can we read/write Structures from/to data files?
Which software is best for programming?
Describe the process of creation and destruction of a derived class object?
Show the application of a dynamic array with the help of an example.
Why we use #include conio h in c++?
Should the this pointer can be used in the constructor?
What are the operators in c++?
What is new in c++?
What are the different types of comments allowed in c++?
What are c++ files?
What is pointer in c++ with example?
What are the two shift operators and what are their functions?
How long will it take to learn programming?
What is this pointer in c++?