← 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 →- Q1. What does this print? (code)
- Q2. What does this print? (code)
- Q3. What does this print? (code)
- Q4. What is the default initial value of a static local int?
- Q5. What happens if a recursive function has no base case?
- Q6. Why do you write a function prototype like int add(int a, int b); above main?
- Q7. What does this print? (code)
- Q8. What does this print? (code)
- Q9. C passes arguments by value. How can a function change a variable that belongs to its caller?
- Q10. How long does an ordinary (auto) local variable exist?