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
To what does “event-driven” refer?
What is the difference between c++ and turbo c++?
What is purpose of abstract class?
What is the difference between a type-specific template friend class and a general template friend class?
What is c++ code?
What is a set in c++?
Which programming language's unsatisfactory performance led to the discovery of c++?
Do you know about C++ 11 standard?
How do we implement inheritance in c++?
What is low level language in simple words?
Difference between inline functions and macros?
What is increment operator in c++?
What is difference between class and structure in c++?
What is the use of main function in c++?
Mention the ways in which parameterized can be invoked.