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
Explain Memory Allocation in C/C++ ?
What is the main purpose of overloading operators?
What is the full form nasa?
What is the header file for setw?
Explain what data encapsulation is in c++?
What are the differences between the function prototype and the function defi-nition?
Write a Program to find the largest of 4 no using macros.
What is algorithm in c++ programming?
Why do we use the using declaration?
Explain the static member function.
write a porgram in c++ that reads an integer and print the biggest digit in the number
Mention the storage classes in c++.
What is meant by a delegate?
What are special characters c++?
Which of the following is evaluated first: a) && b) || c) !