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
C programmers commit fresh crimes against readability
The 2025 International Obfuscated C Code Contest winners are announced, featuring 23 entries including Adrian Cable's Subleq computer emulator that enables software preservation through a one-instruction set architecture.
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.
Tumble Forth – from assembly to OS with C compiler
Virgil Dupras introduces a series of articles aimed at teaching low-level programming by building a Forth system and a partial C compiler from scratch, starting from bare metal to develop operating system concepts.