Informatica - Scuola secondaria di secondo gradoSystem System / Volume Sistemi Informativi Aziendali A per il secondo biennio

Functions and data structures - Quiz

2 esercizi
SVOLGI
INFO

Informatica

The output of a code

What is the output of the following code?

void Op1 (int& y){

y *= 3;

cout << y << endl;

}

int main()

{

int x = 4;

Op1(x);

cout << x << endl;

return 0;

}

A:

12, 12

B:

12, 4

C:

3, 4

D:

4, 12

Scelta multipla
1

Il punteggio di un esercizio è determinato
dalla difficoltà: da 1 (più facile) a 5 (più
difficile). Vuoi saperne di più? Consulta il
Centro assistenza

Informatica

The value of the temp variable

What is the value of the temp variable at the end of the following code where k is the number of rows of mat?

temp = 0;

for (int i=0; i<k; i++) {

temp += mat[i][0];

}

A:

The sum of the first row in mat.

B:

The sum of the first column in mat.

C:

The sum of all elements in mat.

D:

The determinant of mat.

Scelta multipla
1

Il punteggio di un esercizio è determinato
dalla difficoltà: da 1 (più facile) a 5 (più
difficile). Vuoi saperne di più? Consulta il
Centro assistenza