Recursion Mcqs

Our collections of Multiple choice questions and answers focuses on study of ” Recursion ” in Data Structures. These questions are chosen from a collection of most authoritative and best reference books on Data Structures. Our aim is to prepare an individual for competitive exams like NTS | GAT | ECAT | Data Warehouse jobs | Data Mining | DB administration jobs Software House and Computer Programmer jobs | University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate knowledge on Recursion comprehensively.

2.
Recursion is memory-intensive because:

Recursive functions tend to declare many local variables

Previous function calls are still open when the function calls itself and the activation records of these previous calls still occupy space on the call stack

Many copies of the function code are created

It requires large data values

3.
Which of the following statements is true ?

Recursion is always better than iteration

Recursion uses more memory compared to iteration

Recursion uses less memory compared to iteration

Iteration is always better and simpler than recursion

4.
A function, which invokes itself repeatedly until some condition is satisfied, is called a_________.

Recursive function

Big Theta θ(f)

Big Omega Ω(f)

None of the above

7.
A recursive function is often less efficient compared to an iterative function. But it is more________.

Elegant

Complex

Simple

None of the above

8.
A subroutine can be coded so that it may call itself recursively, at___________, in order to perform its task.

One or more places

Two or more places

More places

None of the above

9.
An algorithm that calls itself directly or indirectly is known as

Sub algorithm

Recursion

Polish notation

Traversal algorithm

10.
An iterative function is preferred when its recursive equivalent is__________.

Complex

Simple

Efficient

None of the above

11.
Consider the array {1,1,1,1,1}:Which of the following techniques can be used to search an element in the above array?

Iterative linear search

Recursive linear search

Recursive binary search

All of the mentioned

12.
Consider the following code snippet to find the largest element in a linked list:Which of the following lines should be inserted to complete the below code?

Temp->next != 0

Temp != 0

Head->next != 0

Head != 0

13.
Consider the following code snippet to find the smallest element in a linked list:Which of the following lines should be inserted to complete the below code?

Temp > min_num

Val > min_min

Temp->val < min_num

Temp->val > min_num

14.
Consider the following code snippet to find the smallest element in an array:Which of the following lines should be inserted to complete the below code?

Arr[i] > min_element

Arr[i] < min_element

Arr[i] == min_element

None of the mentioned

15.
Consider the following code snippet to search an element in a linked list:Which of the following lines should be inserted to complete the below code?

Temp = next

Temp->next = temp

Temp = temp->next

Return 0

0Shares
0
Scroll to Top