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
40 questions
Quiz sul Networking

Quiz
•
2nd Grade - University
40 questions
Sistema Operativo

Quiz
•
8th Grade - University
34 questions
Quiz sul linguaggio Assembly

Quiz
•
9th - 12th Grade
39 questions
Algoritmi e diagrammi di flusso

Quiz
•
10th Grade
36 questions
Hardware

Quiz
•
9th - 12th Grade
31 questions
Domande sulla Simulazione Aziendale

Quiz
•
10th Grade
33 questions
Arduino

Quiz
•
10th Grade
38 questions
ALGORITMI e FLOWGORTHM

Quiz
•
9th Grade - University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
20 questions
Understanding Linear Equations and Slopes

Quiz
•
9th - 12th Grade