Questions
C questions
Choose a question page, learn the concept, then test your understanding with a quiz.
2D Array Loop Order and Cache Performance in C
Learn why swapping nested loops changes 2D array performance in C, using row-major memory layout, cache locality, and practical benchmarks.
Array-to-Pointer Conversion in C and C++ Explained
Learn what array-to-pointer conversion means in C and C++, how array decay works, and how it differs from a pointer to an array.
Building More Fault-Tolerant Embedded C++ Applications for Radiation-Prone ARM Systems
Learn practical C++ and compile-time techniques to reduce soft-error damage in embedded ARM systems exposed to radiation.
Bus Error vs Segmentation Fault in C: SIGBUS and SIGSEGV Explained
Learn what bus errors and segmentation faults mean in C, why they happen, how SIGBUS differs from SIGSEGV, and how to debug both safely.
C Arrow Operator (->): Access Struct Members Through Pointers
Learn how C's arrow operator (->) accesses structure members through pointers, why it equals (*pointer).member, and how to use it safely.
C Function Declarations: Empty Parentheses, Prototypes, and Old-Style Parameters
Learn why `int func()` can accept arguments in C, how old-style function definitions use implicit `int`, and the modern prototype syntax to use.
C Pointer to Array vs Array of Pointers: How to Read Complex Declarations
Learn the difference between pointer-to-array and array-of-pointers in C, plus a simple rule for reading complex declarations correctly.
C Shift Operators vs Multiplication and Division Performance
Learn when C compilers replace multiplication with shifts, why manual shifts rarely help, and how overflow and negative values change results.
C String Literals vs Character Arrays: Why char * Can Segfault
Learn why modifying a C string literal through char * is undefined behavior, while a char array creates writable storage for text.
C and C++ File Extensions: .c, .h, .cc, .cpp, .cxx, and .hpp
Learn what .c, .h, .cc, .cpp, .cxx, and .hpp files mean in C and C++, and how build tools use these naming conventions.
C and Java Integer Ranges: Bits, int, and long Explained
Learn why integer ranges differ in C and Java, how signed bits work, and why a 32-bit C int usually matches Java int.
C printf Format Specifier for bool: How to Print Boolean Values
Learn how to print bool values in C with printf, why no %b/%B specifier exists, and the common patterns to print true/false or 0/1.
C strdup(): Duplicating Strings with Dynamic Memory
Learn what C strdup() does, how it allocates and copies strings, when to free its result, and how to handle allocation failures safely.
C vs C++ Character Literals: Why sizeof('a') Differs
Learn why sizeof('a') is usually 4 in C but 1 in C++, and how character literals differ from the char type in each language.
C++ #include: Angle Brackets vs Double Quotes
Learn the difference between #include <...> and #include "..." in C++, including header search paths, conventions, examples, and mistakes.
C++ Header Include Order: Rules, Reasons, and Best Practices
Learn practical C++ header include order, why headers must be self-contained, and how project conventions prevent hidden dependencies.
Calling C or C++ from Python: Building Python Bindings
Learn the quickest ways to call C or C++ from Python, including ctypes, C extensions, Cython, and binding tools with practical examples.
Can You Build an iOS App in Pure C?
Learn how C, Objective-C, UIKit, Core Foundation, and C APIs fit together when building iOS apps, including practical hybrid patterns.
Ceiling Integer Division in C and C++
Learn safe ceiling integer division in C and C++, including positive and signed operands, remainders, overflow risks, and branch-free patterns.
Comparing CGFloat Floating-Point Values in Objective-C
Learn when CGFloat comparisons with == are safe, why floating-point rounding occurs, and how to compare UIKit coordinates reliably in Objective-C.
Page 1 of 9 - 162 questions