A free, self-paced textbook in 7 chapters. Read a chapter, then drill it with the 170 companion flashcards using spaced repetition.
Pointers are central to C, serving as variables that store the memory address of another value. They are declared with the star operator, as in int *ptr, and the address-of operato...
C's basic data types are intentionally minimal: char (at least 8 bits), int (the natural integer size for the platform), float, double, and long double for floating-point values, p...
Arrays in C hold a fixed number of elements of the same type, declared with a compile-time size like int arr[5]. Indexing starts at 0, and unlike some languages C performs no autom...
C functions consist of a return type, name, and parameter list. A function prototype declares these without a body, allowing the compiler to check call-site argument types and forw...
File operations in C begin with fopen, which takes a filename and a mode string. The standard text modes are r, w, and a, while binary variants rb, wb, and so on are required for i...
The C preprocessor runs before compilation and handles directives such as #include, #define, #ifdef, #ifndef, #if, #elif, #else, #endif, and #pragma. Its output is a single transla...
A C program is built in four stages. The preprocessor resolves directives, expands macros, and includes headers to produce a translation unit. The compiler parses that unit, perfor...