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
What is std namespace in c++?
In a function declaration, what does extern mean?
Differentiate between declaration and definition.
If a function doesn’t return a value, how do you declare the function?
What is difference between rand () and srand ()?
Is c++ double?
Why c++ does not have finally?
which operator is used for performing an exponential operation a) > b) ^ c) none
What is the prototype of printf function?
Is java based off c++?
what is VOID?
What is pure virtual function?
What is a constant? Explain with an example.
What are c++ tokens?
What's the "software peter principle”?