Infosys interview question

Related to c and c++