- Executores
-
Aprender
Aprender Python Exemplos executáveis, NumPy, pandas e mais Aprender IA / Machine LearningRedes neurais, ML e LLMs do zero Aprender C e C++ Ponteiros, memória, STL e C++ moderno Aprender C#Fundamentos, POO, LINQ, async e exercícios .NET Aprender MatplotlibGráficos de linha, barras, dispersão e pizza com visualizadores Aprender RustOwnership, traits, tratamento de erros e threads Aprender GoSlices, interfaces, goroutines e channels Algoritmos em Python Busca, ordenação, recursão e visualizações O(n) Algoritmos em C e C++ Compare implementações em C e C++ Programação para crianças Aprenda a programar brincando!
- QuizzesNovo
- DesafiosNovo
- Para professoresNovo
- Atualizações
- Me pague um café
Quiz de C: Pointer Basics
This C quiz checks the first ideas about pointers - what & and * do, how a pointer lets a function change the caller's variable and why NULL must be checked. It is for learners who have just met pointers and want to make them click.
Pergunta de exemplo
Pergunta 1 de 10What does this print?
#include <stdio.h>
int main(void) {
int x = 5;
int *p = &x;
*p = 8;
printf("%d\n", x);
return 0;
}
Mostrar a resposta
B. 8 p holds the address of x, so *p = 8 writes 8 into x itself. There is only one integer here, reached under two names.
O que este quiz cobre
&xgives an address,*pfollows it- Changing a variable through a pointer
- Passing pointers so a function can modify its arguments
- Comparing pointers vs comparing the values they point to
NULLand theint* a, btrap
Perguntas frequentes
Preciso de uma conta?
Não. Qualquer pessoa pode jogar. Entre para guardar seu XP, sequência, badges e histórico.
Posso refazer?
Pode. Sua melhor nota fica salva, e as perguntas e respostas são embaralhadas a cada vez.