Fame Technologies interview question

Explained above