GATE Programming and Data Structures: Recursion – Previous Year Questions
11 GATE previous year questions on Recursion (Programming and Data Structures, Computer Science) with answers and explanations, from every paper.
- GATE 2017 CS Q45 – Consider the following two functions. The output printed when `fun1(5)` is called is
- GATE 2017 CS Q46 – Consider the C functions `foo` and `bar` given below: Invocations of `foo(3)` and `bar(3)` will result in:
- GATE 2016 CS Q45 – What will be the output of the following C program?
- GATE 2018 CS Q31 – Consider the following C program: The output of this program is .
- GATE 2018 CS Q55 – Consider the following program written in pseudo-code. Assume that `x` and `y` are integers. The number of times that the `print` statement is…
- GATE 2019 CS Q36 – Consider the following C function. Which one of the following will happen when the function `convert` is called with any positive integer n as…
- GATE 2026 CS (CS2) Q61 – Consider the following ANSI C function. The maximum possible value that can be returned from this function is . (answer in integer) Note: Ignore…
- GATE 2026 CS (CS1) Q61 – Consider the recursive functions represented by the following code segment: The smallest positive integer n for which `foo(n)` returns 5 is . (answer…
- GATE 2025 CS (CS1) Q61 – The value printed by the given C program is . (Answer in integer)
- GATE 2024 CS (CS1) Q19 – Consider the following C program: Assume that the input to the program from the command line is 1234 followed by a newline character. Which one of the…
- GATE 2020 CS Q56 – Consider the following C functions. The return value of fun2(5) is .