NatWest Group Interview Question

One question is about finding the output of the code snippet.