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)
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
15 questions
Radicales 3º ESO
Quiz
•
9th Grade
10 questions
Kiểm tra 15' tin 8 lần 2
Quiz
•
8th Grade
14 questions
Geometric and Binomial Random Variable
Quiz
•
11th Grade
10 questions
Estadística datos agrupados IELLDM
Quiz
•
10th Grade
15 questions
Luyện tập chung
Quiz
•
2nd Grade - University
17 questions
Week 13 MCQ Madness
Quiz
•
9th - 12th Grade
7 questions
Changes around us
Quiz
•
KG - Professional Dev...
10 questions
TIN 11 - PYTHON - PHÉP TOÁN - BIỂU THỨC - CÂU LỆNH GÁN
Quiz
•
11th Grade
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
Discover more resources for Science
33 questions
Grade 6 Quarter 3 PMA 5 Review
Quiz
•
6th - 8th Grade
85 questions
Midpoint D1 Review
Quiz
•
8th Grade
12 questions
Newton's Laws of Motion
Lesson
•
6th - 8th Grade
10 questions
Exploring the Rock Cycle: Types and Formation
Interactive video
•
6th - 8th Grade
10 questions
Exploring the Layers of the Earth
Interactive video
•
6th - 10th Grade
20 questions
Pure Substances & Mixtures
Quiz
•
8th Grade
28 questions
Genes and Heredity
Lesson
•
8th Grade
24 questions
Subatomic Particles
Quiz
•
8th Grade
