Capgemini Interview Question

Asked some simple programs and a case study to see your thinking ability.