# MCQ on Recursion – Recursion Objective Questions for Practice

## MCQ on Recursion

Recursion is the most important concept in computer science. In my previous posts, i have written about binary search implementation using recursion and difference between recursion and iteration.

These MCQ helps you to understand the concept of Recursion.

1) Which Data Structure is used to perform Recursion?

a) Queue
b) Stack
c) Linked List
D) Tree

2) What’s the output of the following code ?

a)4
b)2
c)3
d)6

3) What’s happen if base condition is not defined in recursion ?

a) Stack underflow
b) Stack Overflow
c) None of these
d) Both a and b

4)

a) 4
b) 12
c) 22
d) 21

5)

a) 12
b) 24
c) 1
d) 0

6)

what will be the output of func(3,8) .

a) 11
b) 24
c) 22
d) 21

Subscribe Our Tutorials

Get Latest Updates on Facebook

7)

What will be the output of print(12).

a) 0011
b) 1100
c) 1001
d) 1000

8)

What will be the output of sum(8).

a) 40
b) 36
c) 8
d) 15

## Answers

1) (b) Stack data structure is used to perform recursion. Recursion use system stack for storing the return addresses of the function calls.

2) (d)

// Explanation

3) (b)

When base condition is not defined in recursion, it will run infinitely until stack overflow (It is a situation in which computer program tries to use more memory space than the call stack has available).

4) (c)

5) (b)

It’s a recursive function for factorial. Explanation of factorial using recursion.

6) (b)

7) (a)

8) (b)
For explanation check find sum of n natural numbers using recursion

## About WebRewrite

I am technology lover who loves to keep updated with latest technology. My interest field is Web Development.
Bookmark the permalink.