C programs from comp programming I