C reference
Look up C syntax and everyday functions one topic at a time. To learn from the start in order, go to Learn C.
- C Arrays: Declare, Initialize, and LoopHandle several values of the same type by index
- C for LoopLoops with a known count: initializer, condition, update
- C if Statement: if, else if, elseBranch on a condition: if, else if, else
- C malloc() and free(): Dynamic MemoryAllocate memory while the program runs and give it back
- C Pointers Explained for BeginnersVariables that hold addresses: &, *, passing to functions, and arrays
- C printf(): Format Specifiers and OutputFormat specifiers %d %f %s %c, plus width and precision
- C scanf String Input: %s and fgets%s reads one word; use fgets for a whole line with spaces
- C scanf(): Read InputRead input into variables: &, several values, the return value
- C Strings: char Arrays, strlen, strcpy, strcmpchar arrays and the end marker, strlen, strcpy, strcmp
- C struct: Define and Use StructuresGroup related values into one unit: struct, typedef, ->
- C switch Statement: case, break, defaultCompare one value with several cases: case, break, default
- C while Loop and do-whileRepeat while a condition is true: while and do-while