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
Why is standard template library used?
Can you use the function fprintf() to display the output on the screen?
What does it mean to declare a member function as virtual?
Write about the members that a derived class can add?
Can a constructor return a value?
What is a list c++?
What is an operator function? Describe the function of an operator function?
What does override mean in c++?
what is VOID?
Why is polymorphism useful?
How many static variables are created if you put one static member into a template class definition?
Why was c++ created?
Discussion on error handling of C++ .
Can we use struct in c++?
Why is c++ still popular?