Quiz Space

Programming in C · End Term · 31 Aug 2025 · May 2025 term · Set QDB1

Question 3: When a recursive function is called, how does the call st…

Question 3

+4 marksOne correct option

When a recursive function is called, how does the call stack (or program stack) manage the function calls?

  1. A

    Each new recursive call overwrites the previous function call on the stack.

  2. B

    Each new recursive call adds a new stack frame to the top of the stack for its local variables and parameters.

  3. C

    The call stack is not used for recursive functions; a separate data structure is used.

  4. D

    The recursive calls are stored in a queue, waiting to be processed in order.

Show answer

Correct answer

  • B

    Each new recursive call adds a new stack frame to the top of the stack for its local variables and parameters.

Question 3 of 24 in the IIT Madras BS Programming in C (Programming in C) End Term paper sat on 31 Aug 2025, in the May 2025 term (IIT M DEGREE AN EXAM QDB3 31 Aug 2025). It carries 4 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2Figure question
  3. Q4Figure question
  4. Q5Figure question
  5. Q6Figure question
  6. Q7Figure question
  7. Q8Figure question
  8. Q9Figure question
  9. Q10Figure question
  10. Q11A special data type is declared where multiple members share the same memory location. The size of an instance of this …
  11. Q12Figure question
  12. Q13In C programming, which memory region is primarily used for storing local variables of functions and function call info…
  13. Q14Figure question
  14. Q15Figure question
  15. Q16What is the primary purpose of the C preprocessor?
  16. Q17Figure question
  17. Q18Figure question
  18. Q19Figure question
  19. Q20Figure question
  20. Q21Figure question
  21. Q22Figure question
  22. Q23Figure question
  23. Q24Figure question