- Ejecutores
-
Aprender
Aprender Python Ejemplos ejecutables, NumPy, pandas y más Aprender IA / Machine LearningRedes neuronales, ML y LLM desde cero Aprender C y C++ Punteros, memoria, STL y C++ moderno Aprender C#Fundamentos, POO, LINQ, async y ejercicios de .NET Aprender MatplotlibGráficos de líneas, barras, dispersión y sectores con visualizadores Aprender RustOwnership, traits, manejo de errores e hilos Aprender GoSlices, interfaces, goroutines y canales Algoritmos en Python Búsqueda, ordenación, recursión y visualizadores O(n) Algoritmos en C y C++ Compara implementaciones en C y C++ Programación para niños ¡Aprende a programar jugando!
- QuizzesNuevo
- RetosNuevo
- Para docentesNuevo
- Actualizaciones
- Invítame a un café
Quiz de 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.
Pregunta de ejemplo
Pregunta 1 de 10What does this print?
#include <stdio.h>
int main(void) {
printf("%d %d %d\n", 12 & 10, 12 | 10, 12 ^ 10);
return 0;
}
Ver la respuesta
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).
Qué cubre este 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
Preguntas frecuentes
¿Necesito una cuenta?
No. Cualquiera puede jugar. Inicia sesión para guardar tu XP, racha, insignias e historial.
¿Puedo repetirlo?
Sí. Se guarda tu mejor puntuación, y las preguntas y respuestas se mezclan cada vez.