
Recursion Function Usage
Quiz
•
Mathematics, Computers
•
University
•
Practice Problem
•
Hard
Yomna Elkholy
Used 4+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A function that is called by itself, either directly or indirectly is called a
Super function
Recursive function
Main function
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following problems can’t be solved using recursion?
Factorial of a number
Nth Fibonacci number
Length of a string
Problems without base case
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In recursion, the condition for which the function will stop calling itself is ___________
Best case
Worst case
Base case
There is no such condition
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen when the following code is executed?
The code will be executed successfully and no output will be generated
The code will be executed successfully and random output will be generated
The code will show a compile time error
The code will run for some time and stop when the stack overflows
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
10
1
10 9 8 … 1 0
10 9 8 … 1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the base case of the program?
return
printf(“%d “, n)
if(n == 0)
my_recursive_function(n-1)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
7 questions
Partial Differentiation
Quiz
•
University
10 questions
Interés sobre Saldos Insolutos
Quiz
•
University
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
15 questions
ADVACOMT-Quiz No.1 (final term)
Quiz
•
University
10 questions
Web-II-Loop and Function
Quiz
•
University
15 questions
SOAL MATEMATIKA PEMINATAN - XII MIPA
Quiz
•
12th Grade - University
10 questions
Physical Applications of the Definite Integral
Quiz
•
University
15 questions
Firewall and Network Security
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
