C Programming Exercise