42 Silly Ways to say Hello in C
summary
Forty-two brief C snippets teach concrete rules and surprises: checks of puts/printf and return codes, array decay and size_t printing, using pointers to iterate instead of indexing, idioms for counting elements, pre vs post increment, goto refactors to for/while, qsort with a comparator, a small remove_dots in-place routine and a swap used to sort, and a typewriter demo using C11 threads. Several examples show undefined behavior (uninitialized pointer write) producing different outputs across compilers and the role of the comma operator and const for sequencing and documentation.
AI-written summary · about
chapters (17)
- 0:00Silly hello variants in C
- 6:32Integer types pitfalls
- 11:28Refactoring loops with goto
- 18:20Square brackets operator
- 22:36Char types and signedness
- 26:50Array passing and pointer arithmetic
- 30:47Pointer-based iteration
- 34:45Sentinel-terminated arrays
- 37:08String literals and null terminators
- 41:31Const correctness
- 44:01Returning pointers
- 45:51Comma operator
- 48:17Effective C book
- 50:25Swapping characters and qsort
- 53:15C11 threading
- 55:44Undefined behavior demo
- 57:57Q&A
related talks
01h 28mProgramming in Modern C with a Sneak Peek into C23
01h 32mA Medley of C++
01h 02mReintroduction to C
51mC++ Features You Might Not Know
52mNon-conforming C++: the Secrets the Committee Is Hiding From You
04mNaval Applications of the C Programming Language
56mCute C++ Tricks (and what you can learn from them): Part 2 of N
15mC++ WAT
