Recursion: GATE CS previous year questions
Recursion is part of Programming and Data Structures in the GATE CS syllabus. This page lists 19 past-paper questions on it from official GATE CS papers.
Recursion
- Consider the following ANSI-C function. int func(int start, int end){ int…
- Consider the following C function. void convert(int n) if(n<0) printf("%d",n); else…
- Consider the following C program: #include <stdio.h> int counter = 0; int calc (int a…
- Consider the following program: int f(int *p, int n) if (n <= 1) return 0; else return…
- Consider the following C function. int fun(int n) int x=1,k; if (n==1) return x; for…
- Consider the following ANSI C function: int SomeFunction(int x, int y) if ((x == 1) ||…
- Consider the following C program: #include <stdio.h> void fX(); int main() fX(); return…
- #include <stdio.h> int foo(int S[],int size){ if(size == 0) return 0; if(size == 1)…
- What will be the output of the following C program? void count(int n){ static int d=1…
- Consider the following recursive C function. void get(int n) if (n<1) return; get(n-1)…
- The recurrence relation capturing the optimal execution time of the Towers of Hanoi…
- Consider the following ANSI C program. #include <stdio.h> int foo(int x, int y, int q) {…
- Common Data for Questions 48 and 49: Consider the following recursive C function that…
- Consider the C functions foo and bar given below: int foo(int val) int x = 0; while(val…
- Consider the following two functions. void fun1(int n) if(n == 0) return; printf("%d"…
- Consider the recursive functions represented by the following code segment: int bar(int…
- Common Data for Questions 48 and 49: Consider the following recursive C function that…
- Consider the C function given below. int f(int j) { static int i = 50; int k; if (i ==…
- Consider the following program written in pseudo-code. Assume that x and y are integers…
More Programming and Data Structures chapters
- Programming in C
- Arrays
- Stacks and Queues
- Linked Lists
- Trees and Binary Search Trees
- Binary Heaps
- Graphs (Data Structure)
Frequently asked questions
How many GATE CS questions are there on Recursion?
PrepWiser has 19 past-paper questions on Recursion from official GATE CS papers.
Are these real GATE CS questions?
Yes. Each one is from an official GATE CS paper and names its year and set. The answers come from the official answer keys.
Where are the step-by-step solutions?
Every question shows its answer, free. Step-by-step solutions, where available, are part of GATE CS Pro.