🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: C Functions and Recursion: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. What does this print? (code)
  2. Q2. What does this print? (code)
  3. Q3. What does this print? (code)
  4. Q4. What is the default initial value of a static local int?
  5. Q5. What happens if a recursive function has no base case?
  6. Q6. Why do you write a function prototype like int add(int a, int b); above main?
  7. Q7. What does this print? (code)
  8. Q8. What does this print? (code)
  9. Q9. C passes arguments by value. How can a function change a variable that belongs to its caller?
  10. Q10. How long does an ordinary (auto) local variable exist?