Capgemini Engineering interview question

oops concepts and technical questions on loops