What is the size of a C structure.?
1. C structure is always 128 bytes.
2. Size of C structure is the total bytes of all elements of structure.
3. Size of C structure is the size of largest element.
4. None of the above
Answers
Answered by
2
3 ) option is the answer
Answered by
1
The correct answer is option (2.) Size of C structure is the total bytes of all elements of structure.
Explanation:
- Structure is a user-defined datatype in C language which allows us to combine data of different types together.
- The Size of C structure is the total bytes of all elements of structure.
- Individually calculate the sizes of each member of a structure and make a total to get Full size of a structure.
- Basically structure of the C program is divided into six different sections, Documentation section: The Documentation section consists of a set of comment lines. Link section: The link section provides instruction to the compiler to link the header files or functions from the system library.
Similar questions