Exercise 4_14.c and slight change to 4_12.c