C switch Statement — Fall-Through, Ranges, and Common Mistakes
Master the C switch statement. Learn fall-through behaviour, break placement bugs, why strings don’t work, and the most common mistakes.
Read articleTutorials, tips and guides for C programmers — from beginner mistakes to advanced systems programming.
Master the C switch statement. Learn fall-through behaviour, break placement bugs, why strings don’t work, and the most common mistakes.
Read articleA dangling pointer points to memory that no longer belongs to your program. Learn the three ways this happens and how to avoid each one.
Read articleLearn which GCC warning flags to always enable and what bugs they catch before your program crashes.
Read articleUnderstand C pointers once and for all. Memory addresses, dereferencing, pointer arithmetic, and double pointers explained with ASCII diagrams.
Read articlechar* and char[] look similar but behave completely differently in C. Learn the memory layout, mutability, and sizeof differences.
Read articleGetting a segfault in C? Here are the 7 most common causes with real code examples and fixes.
Read articleLearn the difference between malloc, calloc, and realloc in C with real code examples. Know which one to use and when.
Read articlescanf is one of the most misused functions in C. Learn how it actually works, why it fails silently, and safer alternatives.
Read articleprintf output not showing? Learn why stdout buffering causes this and how to fix it with n or fflush(stdout).
Read article