Pregunta de entrevista de Infosys

Basic coding problems and c++ language question