Add ex1.c from Ch6