KPMG interview question

Palindrome program explanation Oops concepts