Infosys interview question

Basic coding problems and c++ language question