Skip to the content.

Chapter 7: Input and Output

Exercises from “The C Programming Language” (2nd Edition) by Brian W. Kernighan and Dennis M. Ritchie.

Exercises

# Description Source
7-01 Upper/lower case conversion based on program name -
7-02 Print arbitrary input with non-graphic chars in octal/hex -
7-03 Minprintf: handle more conversions -
7-04 Minscanf: minimal scanf -
7-05 Rewrite postfix calculator using scanf -
7-06 Compare two files, print first differing line -
7-07 Search pattern in files (like grep) -
7-08 Print set of files with filename and page numbers -
7-09 isupper etc. as functions vs macros -

Compilation

gcc -Wall -Wextra -o exercise exercise.c
./exercise