
Funzioni Ricorsive
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
P M
FREE Resource
Enhance your content in a minute
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cosa si intende per caso base in una funzione ricorsiva?
La chiamata finale alla funzione
Il parametro della funzione
La condizione in cui la funzione smette di chiamare sé stessa
Il tipo di ritorno della funzione
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In una funzione ricorsiva, quale delle seguenti affermazioni è vera?
Il caso ricorsivo viene eseguito per primo
Il caso base deve essere evitato
Il caso base impedisce la ricorsione infinita
La ricorsione si ferma dopo 5 chiamate
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cosa sono i parametri formali in una funzione?
I valori passati dal main
Le variabili locali
Le variabili dichiarate tra parentesi tonde nella definizione della funzione
Le costanti
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual è la relazione tra parametri attuali e formali?
Non c'è nessuna relazione
I parametri attuali inizializzano quelli formali
Sono la stessa cosa
I parametri formali vengono passati come costanti
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Il codice seguente rappresenta una funzione ricorsiva corretta:
int funzione(int n) {
if (n <= 0)
return 0;
else
return funzione(n);
}
Sì
No, manca il caso base
No, la funzione non termina
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Completare la funzione somma per sommare i primi N interi:
int somma(int N) {
if (N == 0)
return 0;
else
return ___________;
}
N + somma(N)
N + somma(N - 1)
somma(N - 1)
N * somma(N - 1)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cosa restituisce somma(3) con questa funzione?
int somma(int N) {
if (N == 0) return 0;
else return N + somma(N - 1);
}
3
6
0
9
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
20 questions
test python
Quiz
•
9th - 12th Grade
19 questions
QUIZ 1
Quiz
•
12th Grade
20 questions
I sottoprogrammi in C
Quiz
•
10th - 12th Grade
20 questions
Unit 10 - Client - Server model
Quiz
•
12th Grade - University
20 questions
Toán tử trong C ++
Quiz
•
10th - 12th Grade
20 questions
Ôn tập học kỳ I
Quiz
•
9th - 12th Grade
20 questions
Corel Draw
Quiz
•
9th - 12th Grade
20 questions
Teknik Pengolahan Audio dan Video
Quiz
•
12th 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 Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
