FunPay.in interview question

Oops concept Output of program Behavioural question