
Quiz sobre Ponteiros e Memória
Authored by KLEBER BITENCOURTT
Information Technology (IT)
12th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
O que é um ponteiro em C e qual é a sua principal utilidade?
Um tipo de dado que armazena caracteres.
Uma variável que armazena o endereço de memória de outra variável.
Uma função que aloca memória dinamicamente.
Um operador que compara strings.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a função da biblioteca padrão C utilizada para alocar memória dinamicamente?
`strcpy`
`malloc`
`strcmp`
`strlen`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é o propósito da função `sizeof` em C?
Comparar duas strings.
Copiar o conteúdo de uma string para outra.
Retornar o tamanho em bytes de um tipo de dado ou variável.
Concatenar duas strings.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Como você pode calcular o tamanho de uma string em C?
Usando a função `strcmp`.
Usando a função `strcat`.
Usando a função `strlen`.
Usando a função `strcpy`.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a função utilizada para realocar memória previamente alocada em C?
`malloc`
`free`
`realloc`
`calloc`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual das opções abaixo descreve corretamente o uso da função `strcmp`?
Copiar uma string para outra.
Comparar duas strings e retornar um valor inteiro.
Concatenar duas strings.
Alocar memória para uma string.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a saída do seguinte código em C? ```c char str1[] = "Hello"; char str2[] = "World"; strcat(str1, str2); printf("%s", str1); ```
`Hello`
`World`
`HelloWorld`
`WorldHello`
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?