Struct Initialization in C – Members, Order, and Access

The gentlest struct question in the bank — declare, initialize, add two members. But “easy” questions earn their place by checking the mental model: does {1, 2} land where you think it lands, and is s.a + s.b doing arithmetic on values or something stranger? This question from our C Programming Quiz App settles the …

free() on an Invalid Pointer in C – The Two Rules You Broke

free() has exactly one job and exactly one rule, and this code breaks the rule twice in four lines. This question from our C Programming Quiz App closes out the memory-bug trilogy (after use-after-free and the dangling stack pointer): handing free a pointer it was never meant to see. The Quiz Question int a[3] = …

sizeof a Pointer in C – Why It Is 8 (and When It Is Not)

Ask sizeof about a pointer and it tells you about the pointer — not the pointee, not the value, not the array it might point into. Simple rule, three tempting wrong answers. This question from our C Programming Quiz App also carries an honest asterisk: the right answer is 8 on the platforms that matter …

Array of Char Pointers in C – Why arr[1] Prints “bar”

An array of strings that contains no strings — just three pointers. char *arr[] is how C fakes a string list, and reading it correctly requires untangling a declaration that half of all beginners parse backwards. This question from our C Programming Quiz App checks whether you know what arr[1] is before asking what it …

Union Endianness in C – Why u.c[0] Is Platform-Dependent

Write an int into a union, read it back as bytes — and the answer depends on which machine you’re standing on. This question from our C Programming Quiz App is the rare one whose correct answer is “it depends”: it tests union type punning and endianness, the byte-order property that most C programmers first …

#define in C – How Object-Like Macros Work

MAX looks like a variable, prints like a number, and is neither. This question from our C Programming Quiz App is the gentlest preprocessor question in the bank — but each wrong option maps to a real confusion about what #define actually is, and the “easy” answer has more machinery behind it than it looks. …