What is the output?

In reply to Rahulkumar:

Thanks and this is the correct output. Can you elaborate on the explanation, please?