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
What is null and void pointer?
What is c++ namespace?
What is a vector c++?
what are function pointers?
What do you mean by delegate? Can a user retain delegates?
What is an incomplete type in c++?
What is set in c++?
Is c++ proprietary?
What is atoi?
Explain the purpose of the keyword volatile.
By using c++ with an example describe linked list?
What is the use of main function in c++?
What is #include iostream?
Should the member functions which are made public in the base class be hidden?
How do we implement inheritance in c++?