Class exercises in C/C++