Pregunta de entrevista de Cognizant

some basic programming and logical questions