Recursion

Recursion

University

13 Qs

quiz-placeholder

Similar activities

PT2: Computer language, recursive and loop

PT2: Computer language, recursive and loop

University

17 Qs

Informatik II Quiz 4

Informatik II Quiz 4

University

10 Qs

Sorting and Selection DSA Quiz

Sorting and Selection DSA Quiz

University

12 Qs

Compiler Parsing Techniques

Compiler Parsing Techniques

University

10 Qs

Searching and Sorting

Searching and Sorting

University - Professional Development

15 Qs

Programming Techniques in C++ Final Review

Programming Techniques in C++ Final Review

University

11 Qs

Audiovisual and multimedia communication

Audiovisual and multimedia communication

11th Grade - Professional Development

8 Qs

Recursion Practice, Recursion Practice, Recursion Practice...

Recursion Practice, Recursion Practice, Recursion Practice...

10th Grade - University

10 Qs

Recursion

Recursion

Assessment

Quiz

Computers

University

Medium

Created by

FAKHRUL ZAKI

Used 1+ times

FREE Resource

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is recursion in programming?

A method that calls itself

A method that runs in a loop

A method that sorts data

A method that uses arrays

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a base case in recursion?

A case that runs indefinitely

A case that uses loops

A case that does not call itself

A case that calls itself multiple times

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the binary search algorithm do?

Reverses a list

Counts the number of items

Sorts a list of items

Finds an item in a sorted list

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the factorial method, what is the base case?

1! = 1

0! = 1

N! = N + (N-1)!

N! = N * (N-1)!

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of factorial(3)?

2

3

9

6

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the Fibonacci sequence?

A sequence of odd numbers

A sequence of prime numbers

A sequence where each number is the sum of the two preceding ones

A sequence of even numbers

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if a recursive method does not have a base case?

It will sort the data

It will return zero

It will run successfully

It may cause a stack overflow error

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?