Some exercise C/C++ Advanced