💩

programierds

Tests
C Beginner 5 min

Data types and basic input in C

Short test to practice data types and reading values with scanf in C.

questions

20

Tiempo estimado

05:00:00

Avance: 0%

C Beginner 5 min 20 preguntas

Data types and basic input in C

Short test to practice data types and reading values with scanf in C.

Pregunta 1

Which of the following is an integer data type in C?

Opciones para Which of the following is an integer data type in C?

Pregunta 2

Which data type is used to store numbers with decimals?

Opciones para Which data type is used to store numbers with decimals?

Pregunta 3

Which data type is used to store a single character?

Opciones para Which data type is used to store a single character?

Pregunta 4

Which of the following types usually takes more space?

Opciones para Which of the following types usually takes more space?

Pregunta 5

Which type would you use to store a person's age?

Opciones para Which type would you use to store a person's age?

Pregunta 6

Which type would you use to store the temperature 36.5?

Opciones para Which type would you use to store the temperature 36.5?

Pregunta 7

What value can a char type store?

Opciones para What value can a char type store?

Pregunta 8

Which of these declarations is correct?

Opciones para Which of these declarations is correct?

Pregunta 9

Which type is used for higher precision decimals?

Opciones para Which type is used for higher precision decimals?

Pregunta 10

Which of these variables is correct to store a letter?

Opciones para Which of these variables is correct to store a letter?

Pregunta 11

Which function is used to read data from the keyboard in C?

Opciones para Which function is used to read data from the keyboard in C?

Pregunta 12

Which specifier is used to read an integer with scanf?

Opciones para Which specifier is used to read an integer with scanf?

Pregunta 13

What does this program print if the user enters 8?

Snippet c
int x;
scanf("%d",&x);
printf("%d", x);
Opciones para What does this program print if the user enters 8?

Pregunta 14

Which symbol is used to pass a memory address to scanf?

Opciones para Which symbol is used to pass a memory address to scanf?

Pregunta 15

What does this code do?

Snippet c
int age;
scanf("%d",&age);
Opciones para What does this code do?

Pregunta 16

Which specifier is used to read a float?

Opciones para Which specifier is used to read a float?

Pregunta 17

What does this code print if the user enters 5?

Snippet c
int x;
scanf("%d",&x);
printf("%d", x*2);
Opciones para What does this code print if the user enters 5?

Pregunta 18

What does this code do?

Snippet c
float number;
scanf("%f",&number);
Opciones para What does this code do?

Pregunta 19

What does this program print if you enter 3 and 4?

Snippet c
int a,b;
scanf("%d %d",&a,&b);
printf("%d", a+b);
Opciones para What does this program print if you enter 3 and 4?

Pregunta 20

Which specifier is used to read a character?

Opciones para Which specifier is used to read a character?

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