How much is size of struct having 1 char & 1 integer?
Answer Posted / vadivelt
The size of the stucture depends on the following factors.
1.Depends on the size of the datatype, allocated by compiler
2.Depends on the allignment of the variables in the
structure.
If variables of different datatypes are misalligned, then
badding bytes will be added by the compiler to falitate to
speed up the memory access by the processor.So that the size
of the structure will increase.
| Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
Are there interfaces in c++?
Explain the term memory alignment?
What is iostream in c++ used for?
What is set in c++?
Is c++ map a hash table?
What is the this pointer?
What are different types of loops in c++?
What are multiple inheritances (virtual inheritance)?
What is a pointer with example?
Who made c++?
Explain the register storage classes in c++.
What is object in c++ wikipedia?
When do we use copy constructors?
When does a 'this' pointer get created?
How did c++ get its name?