- 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: Bitwise Operators
Bit manipulation shows up in flags, hardware registers and interview questions alike. This C quiz checks the bitwise operators, shifts, common bit tricks and the precedence trap that catches almost everyone once.
Domanda di esempio
Domanda 1 di 10What does this print?
#include <stdio.h>
int main(void) {
printf("%d %d %d\n", 12 & 10, 12 | 10, 12 ^ 10);
return 0;
}
Mostra la risposta
C. 8 14 6 In binary 12 is 1100 and 10 is 1010. AND keeps bits set in both (1000 = 8), OR keeps bits set in either (1110 = 14), XOR keeps bits set in exactly one (0110 = 6).
Cosa copre questo quiz
&,|,^and~on small numbers- Shifting with
<<and>> - Setting, clearing, toggling and testing a single bit
- The precedence of
&compared with== - Why bit work uses unsigned types
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.