Series 2: C Foundations
Time to translate your Java skills into C. This series covers everything from your first #include
Lessons
2.1: How Do Regular Expressions Help Find Text Patterns?
~20 min · Week 3 · Prereq: Lessons 1.2, 1.3, 1.5
grep, regex syntax, find — searching files by name and content. Connecting Java’s Pattern class to Unix command-line tools.
2.2: What are Processes and How Do I Manage Them?
~18 min · Week 3 · Prereq: Lesson 1.5
ps, top, kill, background/foreground jobs. Every program you run becomes a process — here’s how to see and control them.
2.3: How Do I Translate from Java to C Compilation?
~20 min · Week 3 · Prereq: Lessons 1.6, 2.2
From javac + JVM to gcc + native binary. Preprocessor, compiler, assembler, linker — the four stages of C compilation.
2.4: What Is the Structure of a C Program?
~20 min · Week 3 · Prereq: Lesson 2.3
#include, main(), return values, comments. Side-by-side comparison of Java class structure vs. C program structure.
2.5: How Do I Store and Display Data with Variables and I/O?
~22 min · Week 3 · Prereq: Lesson 2.4
C data types, printf format specifiers, scanf for input. Why C has no String type and what that means.
2.6: What Are Operators and How Do I Use Them in Expressions?
~18 min · Week 4 · Prereq: Lesson 2.5
Arithmetic, relational, logical, bitwise operators. Operator precedence and the gotchas that catch Java programmers.
2.7: How Do I Make Decisions with If, Else, and Switch?
~20 min · Week 4 · Prereq: Lesson 2.6
Conditional statements, switch/case, and the critical difference: C has no boolean type (before C99).
2.8: How Do Loops Let Me Repeat Code?
~18 min · Week 4 · Prereq: Lesson 2.7
for, while, do-while. Loop patterns in C vs. Java, and why break/continue work the same way.
2.9: How Do I Organize Code with Functions and Recursion?
~22 min · Week 4 · Prereq: Lesson 2.8
Function prototypes, pass-by-value, scope. Why C requires explicit prototypes and what void means differently than in Java.
2.10: How Do I Handle User Input Robustly?
~18 min · Week 4 · Prereq: Lessons 2.5, 2.9
scanf pitfalls, buffer clearing, input validation loops. The defensive coding patterns you need for every interactive C program.
2.11: How Do Header Files and Makefiles Organize C Projects?
~22 min · Week 5 · Prereq: Lessons 2.3, 2.9
Header guards, #include vs. linking, Makefile rules and targets. From Java’s import to C’s compilation model.
2.12: How Do Arrays Store and Organize Multiple Values?
~20 min · Week 5 · Prereq: Lessons 2.8, 2.9
Fixed-size arrays, array decay, passing arrays to functions. Why C arrays are just memory blocks, not objects.
2.13: How Do I Work with Strings as Character Arrays?
~20 min · Week 5 · Prereq: Lesson 2.12
Null-terminated char arrays, string.h functions, buffer overflows. The biggest difference from Java’s String class.
2.14: How Do I Sort and Search Collections?
~18 min · Week 5 · Prereq: Lessons 2.12, 2.13
Selection sort, linear search, binary search. Sorting arrays of integers and strings.
2.15: How Do I Use Command-Line Arguments in C?
~18 min · Week 5 · Prereq: Lessons 2.12, 2.13
argc and argv, parsing options, converting string arguments to numbers. Connecting command-line tools to your C programs.
Related resources:
- C vs Java Cheat Sheet — keep this open during labs for quick Java-to-C translation
- CTF Challenges — weekly security challenges tied to what you learn each week
Previous series: ← Series 1: Unix Foundations
Next series: Series 3: Pointers & Memory →