~/talk

42 Silly Ways to say Hello in C

Talkat NDC TechTown 2022 · 2022-08-29..09-01· [c-and-cpp]
slides:none on file

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

  1. 0:00Silly hello variants in C
  2. 6:32Integer types pitfalls
  3. 11:28Refactoring loops with goto
  4. 18:20Square brackets operator
  5. 22:36Char types and signedness
  6. 26:50Array passing and pointer arithmetic
  7. 30:47Pointer-based iteration
  8. 34:45Sentinel-terminated arrays
  9. 37:08String literals and null terminators
  10. 41:31Const correctness
  11. 44:01Returning pointers
  12. 45:51Comma operator
  13. 48:17Effective C book
  14. 50:25Swapping characters and qsort
  15. 53:15C11 threading
  16. 55:44Undefined behavior demo
  17. 57:57Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.