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 do we need runtime polymorphism in c++?
give me an example for testing a program showing the test path .show how the test is important and complex.
How does code-bloating occur in c++?
Are vectors faster than arrays?
How many keywords are used in c++?
Is c++ pass by reference or value?
When do we run a shell in the unix system? How will you tell which shell you are running?
What is the difference between a baller and a reference in C++?
Can create new c++ operators?
Can class objects be passed as function arguments?
What is the difference between function overloading and operator overloading?
What are the advantages of early binding?
Does c++ have a hash table?
Is c++ fully object oriented?
What are abstract data types in c++?