💩

programierds

Tests
C Beginner 15 min

Variables in C

Test to learn how to declare and use variables in C.

questions

30

Tiempo estimado

15:00:00

Avance: 0%

C Beginner 15 min 30 preguntas

Variables in C

Test to learn how to declare and use variables in C.

Pregunta 1

What is a variable in C?

Opciones para What is a variable in C?

Pregunta 2

What is the correct way to declare a variable?

Opciones para What is the correct way to declare a variable?

Pregunta 3

What does this code print?

Snippet c
int x = 5;
printf("%d", x);
Opciones para What does this code print?

Pregunta 4

Which type is used for integer numbers?

Opciones para Which type is used for integer numbers?

Pregunta 5

What does this print?

Snippet c
int a = 3;
int b = 2;
printf("%d", a+b);
Opciones para What does this print?

Pregunta 6

Which is a valid variable name?

Opciones para Which is a valid variable name?

Pregunta 7

What does this code do?

Snippet c
int x;
x = 10;
Opciones para What does this code do?

Pregunta 8

What does this print?

Snippet c
int x = 4;
printf("%d", x*2);
Opciones para What does this print?

Pregunta 9

Which operator is used to assign values?

Opciones para Which operator is used to assign values?

Pregunta 10

What does this print?

Snippet c
int x = 7;
x = x + 3;
printf("%d", x);
Opciones para What does this print?

Pregunta 11

What is the purpose of a variable?

Opciones para What is the purpose of a variable?

Pregunta 12

What does this print?

Snippet c
int a = 2;
int b = 5;
printf("%d", b-a);
Opciones para What does this print?

Pregunta 13

Which type would you use for decimals?

Opciones para Which type would you use for decimals?

Pregunta 14

What does this print?

Snippet c
int x = 3;
int y = 4;
printf("%d", x*y);
Opciones para What does this print?

Pregunta 15

What does printf do?

Opciones para What does printf do?

Pregunta 16

What does this print?

Snippet c
int x = 9;
printf("%d", x-4);
Opciones para What does this print?

Pregunta 17

Which is a valid data type?

Opciones para Which is a valid data type?

Pregunta 18

What does this print?

Snippet c
int x = 2;
printf("%d", x+5);
Opciones para What does this print?

Pregunta 19

What does this code do?

Snippet c
int age = 20;
Opciones para What does this code do?

Pregunta 20

What does this print?

Snippet c
int x = 10;
x = x/2;
printf("%d", x);
Opciones para What does this print?

Pregunta 21

Which operator adds values?

Opciones para Which operator adds values?

Pregunta 22

What does this print?

Snippet c
int x = 6;
printf("%d", x+1);
Opciones para What does this print?

Pregunta 23

Which operator multiplies?

Opciones para Which operator multiplies?

Pregunta 24

What does this print?

Snippet c
int x = 8;
printf("%d", x/2);
Opciones para What does this print?

Pregunta 25

What does this print?

Snippet c
int x = 5;
int y = x + 2;
printf("%d", y);
Opciones para What does this print?

Pregunta 26

Which type is used for letters?

Opciones para Which type is used for letters?

Pregunta 27

What does this print?

Snippet c
int x = 4;
printf("%d", x*x);
Opciones para What does this print?

Pregunta 28

Which operator subtracts?

Opciones para Which operator subtracts?

Pregunta 29

What does this print?

Snippet c
int x = 12;
printf("%d", x-2);
Opciones para What does this print?

Pregunta 30

What does a variable do?

Opciones para What does a variable do?

Elegi una opcion por pregunta y despues hace click en Revisar resultados.