Pregunta de entrevista de Cognizant

Basic programming questions which were easy