Nokia Interview Question

Problem solving in C and C++. Counter check the solutions that you will submit