Infosys interview question

c++ some what tricky questions...