- Esecutori
-
Impara
Impara Python Esempi eseguibili, NumPy, pandas e altro Impara l'IA / Machine LearningReti neurali, ML e LLM da zero Impara C e C++ Puntatori, memoria, STL e C++ moderno Impara C#Fondamenti, OOP, LINQ, async ed esercizi .NET Impara MatplotlibGrafici a linee, barre, dispersione e torta con visualizzatori Impara RustOwnership, trait, gestione degli errori e thread Impara GoSlice, interfacce, goroutine e canali Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++ Programmazione per bambini Impara a programmare giocando!
- QuizNuovo
- SfideNuovo
- Per docentiNuovo
- Aggiornamenti
- Offrimi un caffè
Quiz di C: printf & scanf
This C quiz tests the format strings of printf and scanf. You will predict formatted output with widths, precision and padding, pick the right conversion specifiers and learn why scanf needs addresses.
Domanda di esempio
Domanda 1 di 10What does this print?
#include <stdio.h>
int main(void) {
printf("%d + %d = %d\n", 2, 3, 2 + 3);
return 0;
}
Mostra la risposta
C. 2 + 3 = 5 Each %d is replaced by the next argument in order: 2, 3 and the value of 2 + 3, which is 5. The expression is evaluated before printf sees it.
Cosa copre questo quiz
- Conversion specifiers like
%d,%f,%x,%cand%s - Width, precision, zero padding and left alignment
- Printing a literal
% - Why
scanftakes&variableand what it returns %lfinscanfvs%finprintf
Domande frequenti
Serve un account?
No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.
Posso rifarlo?
Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.