Infosys interview question

some technical question on c++