My code in C and C++