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
Why #include is used?
Out of fgets() and gets() which function is safe to use and why?
Do you know what is overriding?
What are the sizes and ranges of the basic c++ data types?
Can we get the value of ios format flags?
What do you mean by vtable and vptr in c++?
What do you mean by translation unit in c++?
What is the auto keyword good for in c++?
What is diamond problem in c++?
What are the stages in the development cycle?
What is a driver program?
Is c++ map a hash table?
What is an undefined behavior and sequence points
Explain the purpose of the keyword volatile.
When do you call copy constructors?