There is no variable declaration in main. So, b in main refers to global b and is initialized to 12.
In N also no declaration of b. So, it updates the global b to 13.
The reference of the global b is passed to M and M updates it to 169.
So, output a = 169, b = 169.