You can prepare effectively for Computer Science Engineering (CSE) GATE Computer Science Engineering(CSE) 2027 Mock Test Series with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Recursion- 2". These 20 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.
Test Highlights:
Sign up on EduRev for free to attempt this test and track your preparation progress.
Detailed Solution: Question 1
Consider the following recursive function fun(x, y). What is the value of fun(4, 3)
Detailed Solution: Question 2
Detailed Solution: Question 3
Detailed Solution: Question 4
Detailed Solution: Question 5
Consider the following recursive C function that takes two arguments
unsigned int foo(unsigned int n, unsigned int r){
if(n >0) return (n%r + foo (n/r, r));
else return 0;
}
Q.
What is the return value of the function foo when it is called as foo(345, 10) ?
Detailed Solution: Question 9
Consider the same recursive C function that takes two arguments
Q. What is the return value of the function foo when it is called as foo(513, 2)?
Detailed Solution: Question 10
Detailed Solution: Question 11
Detailed Solution: Question 12
Consider the following code snippet:
What will happen when the above snippet is executed?
Detailed Solution: Question 13
Consider the C function given below.
Q. Which one of the following is TRUE?
Detailed Solution: Question 14
Consider the following C function:
The value returned by f(1) is
Consider the following C function.
Q. The return value of fun(5) is __________.
Detailed Solution: Question 17
Consider the following recursive C function. If get(6) function is being called in main() then how many times will the get() function be invoked before returning to the main()?
Detailed Solution: Question 18
Detailed Solution: Question 19
The function f is defined as follows:
Assuming that arbitrarily large integers can be passed as a parameter to the function, consider the following statements.
1. The function f terminates for finitely many different values of n ≥ 1.
ii. The function f terminates for infinitely many different values of n ≥ 1.
iii. The function f does not terminate for finitely many different values of n ≥ 1.
iv. The function f does not terminate for infinitely many different values of n ≥ 1.
Which one of the following options is true of the above?
Detailed Solution: Question 20