C++ MCQs - Recursion

This section focuses on the "Recursion" in C++ programming langauge. These Multiple Choice Questions (MCQ) should be practiced to improve the C++ programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. __________ is the technique of making a function call itself.

A. Lambdas
B. Smart
C. Recursion
D. Self

View Answer


2. Recursion is important because?

A. reduce the length of our code
B. make code easy to read
C. make code easy to write
D. All of the above

View Answer


3. Recursion uses more memory.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


4. How many type of recursion there?

A. 1
B. 2
C. 3
D. 4

View Answer


5. Which of the following are real applications of recursion in real problems?

A. Tree and graph traversal
B. Sorting algorithms
C. Divide-and-conquer algorithms
D. All of the above

View Answer


6. Which data structure can be implemented using recursion?

A. Linked list
B. Stack
C. Queue
D. All of the above

View Answer


7. What is mutual recursion?

A. Two functions that call each other.
B. Two functions that are unrelated to each other.
C. Two functions that are called at the same time.
D. Two functions that never terminate.

View Answer


8. What is the difference between direct and indirect recursion?

A. Indirect recursion is faster than direct recursion
B. Direct recursion is faster than indirect recursion
C. Direct recursion calls itself directly, while indirect recursion calls another function
D. Indirect recursion calls itself directly, while direct recursion calls another function

View Answer


9. Recursion that calls itself at the end of the function known as?

A. direct recursion
B. indirect recursion
C. tail recursion
D. mutual recursion

View Answer


10. Infinite recursion may lead to running out of stack memory.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer





Discussion



* You must be logged in to add comment.