C++ Recursion
Quiz
•
Science, Computers, Mathematics
•
8th - 12th Grade
•
Practice Problem
•
Medium
Standards-aligned
Natalia Fumero
Used 172+ times
FREE Resource
Enhance your content in a minute
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The process of defining a problem (or the solution to a problem) in terms of (a simpler version of) itself is known as:
repetition
recursion
reapparition
reversing
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is the best definition of a recursive method?
A method that iterates itself exactly 5 times.
A method that invokes itself by name within the method.
A method that will never iterate infinitely.
A method that cannot be called more than once.
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Recursion is similar to which of the following?
if-else
switch-case
loops
none of the above
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Name the condition at which the recursive method will stop calling itself.
Base case
Worst Case
Best Case
None of the above
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The following function finds the factorial of any number
int factorial(int n)
{
if(n == 0 || n == 1) return 1;
return n * factorial(n-1);
}
What would calling factorial(4) output?
24
16
8
64
Tags
CCSS.HSF.IF.A.3
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The following function finds the factorial of any number
int factorial(int n)
{
if(n == 0 || n == 1) return 1;
return n * factorial(n-1);
}
What would calling factorial(2) output?
12
2
0
22
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Make the following function return the following number in the fibonacci sequence
int fibo(int n)
{
if(n == 0 || n == 1) return n;
return _________________;
}
fib (n-1)+fib (n-2)
fibo(n-1)+fibo(n-2)
fibo(n*2)
fibo(n+1)+fibo(n+2)
Create a free account and access millions of resources
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
14 questions
1ERA EVALUACIÓN: RIESGOS Y TERREMOTOS
Quiz
•
12th Grade
9 questions
Matemática 6º año
Quiz
•
12th Grade
11 questions
Algebra 1 Final Exam
Quiz
•
9th Grade
10 questions
Hệ Điều Hành Của Máy Tính
Quiz
•
10th Grade - University
10 questions
19 NMMS અંગ્રેજી મૂળાક્ષર શ્રેણી
Quiz
•
8th Grade
15 questions
Grade 11-12 Elimination
Quiz
•
9th - 10th Grade
10 questions
Quiz: Secants, Tangents, and Sectors
Quiz
•
9th - 10th Grade
12 questions
Parabola1
Quiz
•
10th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Science
20 questions
Name That Tune Christmas Edition
Quiz
•
6th - 9th Grade
18 questions
Christmas Science
Quiz
•
6th - 8th Grade
37 questions
8.10B Weather Patterns
Quiz
•
8th Grade
10 questions
Exploring Plate Tectonics and Their Boundaries
Interactive video
•
6th - 10th Grade
22 questions
Amplify - Traits and Reproduction
Quiz
•
8th Grade
15 questions
Snow
Quiz
•
6th - 8th Grade
20 questions
Human Impact on the Environment Review #2
Quiz
•
9th Grade
15 questions
Movie Trivia for Christmas
Quiz
•
6th - 8th Grade
