9. Which is the right answer to the following: struct S { int i; float f; }; union u { int i; float f; }; Which of the following expressions is true? Pick ONE option
Answers
Answered by
1
Answer:
the answer is union u is the correct answer
Answered by
0
Answer
sizeof(struct S)>sizeof(union u)
Step-by-step explanation:
- Struct is the keyword for structures and is used to combine a number of connected variables under one place
- Union comes under a type of structure and is used when memory turns to be a deciding factor
- (sizeof) operator gives the memory size of its operand
- Members under structure occupies separate memory location
- Members under union occupies the same memory loaction
Similar questions
Math,
18 days ago
Science,
18 days ago
Environmental Sciences,
18 days ago
CBSE BOARD X,
1 month ago
Math,
9 months ago