Quiz de Programação em C

Quiz
•
Information Technology (IT)
•
University
•
Medium
Amanda Xavier
Used 7+ times
FREE Resource
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Em C, qual das seguintes declarações de variáveis é inválida?
int nota1;
float salário_total;
char ende'reço;
double _valor;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Considere o seguinte código em C: #include int main() { int x = 5, y = 3; x = y - x; y = 2 * y * (-x); printf("x = %d, y = %d", x, y); return 0; } Qual será a saída desse programa?
x = -2, y = 12
x = -2, y = -12
x = 2, y = 12
x = 2, y = -12
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a função do operador % em C?
Realizar a divisão exata entre dois inteiros.
Retornar o quociente da divisão entre dois inteiros.
Determinar o resto da divisão inteira.
Converter um número decimal para inteiro.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Qual será a saída do código abaixo, assumindo que o usuário digita o valor 3 quando solicitado?
#include <sdtio.h>
int main() {
int x;
scanf("%d", &x);
x = x + x;
printf("%d\n", x);
return 0;
}
3
6
9
Nenhuma saída, pois há erro no código.
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
No código a seguir, qual será o valor final de y?
#include <stdio.h>
int main() {
int x = 2, y = 6, temp;
temp = x;
x = y;
y = temp;
return 0;
}
2
6
8
4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual será a saída do programa a seguir? #include <stdio.h>
int main() {
float x = 2.78;
printf("%10.2f\n", x);
return 0;
}
____2.780
______2.78
_______2.78
2.780000
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Em relação às variáveis de ponto flutuante em C, qual afirmação está correta?
O tipo float tem maior precisão que o tipo double.
Para imprimir um double no printf, é obrigatório usar %lf.
A precisão de long double é menor que a de double.
O tipo float ocupa menos memória que o tipo double.
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
Mảng 2 chiều trong C

Quiz
•
University
20 questions
Revissão - Linguagem C (str, fun, stru, vt+mt,)

Quiz
•
University
15 questions
BYTS ASSESSMENT

Quiz
•
University
15 questions
Eval. 3B Bloque 1

Quiz
•
9th Grade - University
13 questions
Session 15 + 16 : Function

Quiz
•
University
12 questions
Aula07 - Matrizes

Quiz
•
University
20 questions
Quiz - Informática Básica

Quiz
•
University
14 questions
Teste de SQL: Tabelas e Inserções

Quiz
•
10th Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade