Recursion Function Usage

Recursion Function Usage

University

10 Qs

quiz-placeholder

Similar activities

OOP 1 Undiksha

OOP 1 Undiksha

12th Grade - University

13 Qs

Chapter 3 Exploring Linux Filesystems

Chapter 3 Exploring Linux Filesystems

11th Grade - University

10 Qs

Finding Derivatives

Finding Derivatives

University

10 Qs

Parametrics Quiz

Parametrics Quiz

KG - University

10 Qs

Adobe Photoshop

Adobe Photoshop

University

10 Qs

After Effect Intoduction

After Effect Intoduction

10th Grade - University

15 Qs

Quizz Internet

Quizz Internet

KG - Professional Development

12 Qs

DBM20023 Exponential Differentiation

DBM20023 Exponential Differentiation

University

10 Qs

Recursion Function Usage

Recursion Function Usage

Assessment

Quiz

Mathematics, Computers

University

Practice Problem

Hard

Created by

Yomna Elkholy

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Media Image

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

Media Image

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

Media Image

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?