homework c: