Pregunta de entrevista de Infosys

basic question on c++ and java