C programming homework