exercise in C