How much is size of struct having 1 char & 1 integer?
Answer Posted / raja
you will have to study through structure padding concepts.
It depends on the compiler.
struct
{
char a;
int b;
}
The above struct size will be 8 in standard compilers (Turbo
C is a non-standard compiler). bcoz between a and b there
will be 3 pad bytes placed..
Refer this link you will know everything about structure
padding..All d best :)
http://www.allinterview.com/showanswers/62991.html
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Is map thread safe c++?
What is the best it certification?
What is the c++ programming language used for?
What are special characters c++?
What is enum class in c++?
Can non-public members of another instance of the class be retrieved by the method of the same class?
What is the disadvantage of using a macro?
What is exception handling? Does c++ support exception handling?
Write a function that swaps the values of two integers, using int* as the argument type?
What does it mean to declare a destructor as static?
What is the insertion operator and what does it do?
What is iterator c++?
Why is main an int?
What is ctime c++?
Why do we need templates?