Getting silly with C, part &((int*)-8)[3]
Summary
A humorous educational article covering C programming fundamentals such as forward declarations, operator precedence, unconditional jumps, and basic arithmetic with intentionally silly code examples.
View Cached Full Text
Cached at: 06/08/26, 03:19 AM
Similar Articles
John Regehr's Integers in C Quiz
An archival version of John Regehr's C integers quiz, wrapped in JavaScript for browser compatibility, highlighting tricky undefined behavior and integer issues in C code.
Discussion about C array type semantics
The article explains the confusing behavior of C array types, including their decay to pointers, exceptions like sizeof and function parameters, and compares it to function types, suggesting a mental model where arrays and pointers are strictly separated.
Int a = 5; a = a++ + ++a; a =? (2011)
Analyzes the undefined behavior of the C/C++ expression 'a = a++ + ++a;' for int a=5, demonstrating three possible results (11, 12, 13) due to compiler-dependent evaluation order and post-increment handling, with theoretical and experimental breakdown.
Starting Systems Programming, Pt 1: Programmers Write Programs (2025)
An introductory article on systems programming covering fundamentals such as bit manipulation, parsing, filesystems, syscalls, and memory management, targeted at programmers.
No way to parse integers in C (2022)
The article criticizes C standard library functions for parsing integers (atol, strtol, strtoul, sscanf), explaining why most are broken and only strtol can be used correctly with careful error handling.