Explain the code please,how it outputs 2.

Printable View