Quiz Space

Programming in C · End Term · 24 Dec 2023 · September 2023 term · Set 3

Programming in C End Term 24 Dec 2023 — Question 12

Question 12

+4 marksOne correct option

In a union, how is memory allocated for its members?

  1. A

    Each member gets its own separate memory space of a fixed, equal size.

  2. B

    Allocated memory is shared among all members, and the memory size is equalto the size of the largest member.

  3. C

    Allocated memory is shared among all members, and the memory size is equalto the size of the smallest member.

  4. D

    The size of the allocated memory is equal to the sum of the sizes of itsmembers.

Show answer

Correct answer

  • B

    Allocated memory is shared among all members, and the memory size is equalto the size of the largest member.

Question 12 of 26 in the IIT Madras BS Programming in C (Programming in C) End Term paper sat on 24 Dec 2023, in the September 2023 term (IIT M ES FOUNDATION FN EXAM FEF2 24 Dec 2023). It carries 4 marks.

This question was also asked in

More questions from this paper

  1. Q1THIS IS QUESTION PAPER FOR THE SUBJECT "FOUNDATION LEVEL : INTRODUCTION TO C PROGRAMMING (COMPUTER BASED EXAM)" ARE YOU…
  2. Q2Figure question
  3. Q3Figure question
  4. Q4Figure question
  5. Q5Figure question
  6. Q6Consider an integer variable holding a value “0x89209899”. Suppose the available memory addresses are starting from the…
  7. Q7Which of the following statements about array initialization in C is correct?
  8. Q8Figure question
  9. Q9Figure question
  10. Q10Figure question
  11. Q11Figure question
  12. Q13Figure question
  13. Q14Figure question
  14. Q15Suppose you open a file in “a” mode, write 10 characters - ABCDEFGHIJ, and close it. You open it again using “w” mode, …
  15. Q16Figure question
  16. Q17Figure question
  17. Q18Which of the following statements is/are true regarding functions in C?
  18. Q19Which of the following functions computes and returns the factorial of a given positive integer num?
  19. Q20In C, which of the following are valid operations on pointer variables? (Select all that apply)
  20. Q21Figure question
  21. Q22Figure question
  22. Q23Figure question
  23. Q24Which of the following storage classes initialize a variable with the value 0, if not initialized explicitly?
  24. Q25Figure question
  25. Q26Figure question