modified:   ex5.c