Quizzes

C quizzes

Choose a quiz and test your understanding of a focused concept.

Const Pointer Quiz: `const int *`, `int * const`, and `const int * const` in C/C++

Test your understanding of `const` with pointers in C/C++: assignments, modification rules, function parameters, and common mistakes.

Difference Between #include <...> and #include "..." in C and C++ Quiz

Learn when to use #include <...> vs #include "..." in C and C++ with this quiz on header search paths, conventions, mistakes, and examples.

How to Improve SQLite INSERT Performance in C Quiz

Test your understanding of fast SQLite bulk inserts in C using transactions, prepared statements, PRAGMAs, and index timing.

How to Set, Clear, and Toggle a Single Bit in C Quiz

Test your understanding of setting, clearing, and toggling single bits in C with masks, bitwise operators, pitfalls, and examples.

Should You Cast malloc in C? Quiz on malloc Return Types and Best Practices

Test your understanding of why C code usually should not cast malloc, plus sizeof patterns, NULL checks, and common mistakes.

Understanding the `-->` Pattern in C and C++ Quiz

Test your understanding of `x-- > 0` in C and C++: parsing, post-decrement behavior, loop output, pitfalls, and clearer alternatives.

What Does `:-!!` Mean in C? Quiz on Bit-Fields and Compile-Time Error Macros

Test your understanding of `:-!!(e)` in C, bit-field width tricks, compile-time errors, `sizeof`, and Linux-style build bug macros.

What Does `??!??!` Mean in C? Trigraphs and Logical OR Quiz

Test your understanding of C trigraphs, `??!??!`, logical OR, and short-circuit evaluation with practical code questions.

What `extern "C"` Does in C++: Name Mangling, Linkage, and C Interop Quiz

Test your understanding of `extern "C"` in C++: C linkage, name mangling, C headers, common mistakes, and real interop use cases.

Why `a[5]` Equals `5[a]` in C Quiz: Array Indexing and Pointer Arithmetic

Test your understanding of why `a[5]` equals `5[a]` in C using array indexing, pointer arithmetic, common mistakes, and examples.