Virtusa interview question

Program on array Some oops concepts