Capgemini interview question

Program on structures