Fresherworld.com interview question

Oops concept