C/C++ exercise.