Daniel sta programmando in C# e si chiede: Che cosa fa un'istruzione if in C#?

Test di Programmazione in C#

Quiz
•
Computers
•
10th Grade
•
Medium
Maria Carmela Emma
Used 3+ times
FREE Resource
36 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Esegue sempre un blocco di codice indipendentemente dalla condizione.
Termina l'esecuzione del programma se la condizione è falsa.
Ripete un blocco di codice fino a quando la condizione è vera.
Controlla una condizione e esegue un blocco di codice se la condizione è vera.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Samuel sta cercando di scrivere un programma in C# e si chiede qual è la sintassi corretta per un ciclo for. Puoi aiutarlo?
for (int i = 0; i < n; i++) { // codice da eseguire }
for (int i = 0; i < n; ++i) { // codice }
for (i = 0; i < n; i++) { codice da eseguire }
for (int i = 0; i < n; i) { // codice da eseguire }
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Evelyn sta cercando di capire come utilizzare un ciclo while in C#. Qual è la sintassi corretta che dovrebbe usare?
Utilizza la sintassi 'while (condizione) { // codice }'.
Utilizza la sintassi 'for (int i = 0; i < n; i++) { // codice }'.
Utilizza la sintassi 'do { // codice } while (condizione);'.
Utilizza la sintassi 'if (condizione) { // codice }'.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Emma sta cercando di capire la differenza tra do while e while in C#. Può aiutarti a spiegare?
'while' esegue il corpo del ciclo prima di controllare la condizione.
Entrambi i cicli sono identici e non hanno differenze.
La differenza principale è che 'while' controlla la condizione prima di eseguire il corpo del ciclo, mentre 'do while' lo esegue almeno una volta prima di controllare la condizione.
'do while' non può essere utilizzato in un ciclo infinito.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Mia sta programmando un'applicazione in C# e si chiede: cosa sono gli operatori logici in C#?
XOR (^)
NAND (!&&)
Operatori logici in C# sono AND (&&), OR (||) e NOT (!).
NOR (!||)
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Scarlett sta cercando di dichiarare un array in C#. Quale delle seguenti opzioni è corretta?
int myArray[] = new int[5];
int[] myArray; or int[] myArray = new int[5]; or int[] myArray = {1, 2, 3, 4, 5};
array myArray int[];
int myArray = {1, 2, 3, 4, 5};
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Abigail ha un array di punteggi degli esami in C#. Qual è la sintassi per accedere al punteggio del secondo esame?
arrayName.at(index)
array[index]
array.get(index)
arrayName[index]
Create a free account and access millions of resources
Similar Resources on Quizizz
36 questions
UJIAN TIK

Quiz
•
9th - 12th Grade
33 questions
Ripasso

Quiz
•
10th Grade
40 questions
Fondamenti di Informatica

Quiz
•
10th Grade - University
33 questions
Valutazione critica delle fonti e fake news

Quiz
•
10th Grade
35 questions
Quiz sulla Rete e Sicurezza Informatica

Quiz
•
9th Grade - University
36 questions
ECDL-modulo2

Quiz
•
10th Grade
35 questions
Quiz sul Computer

Quiz
•
10th Grade
41 questions
Basi di dati

Quiz
•
8th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University