See, working of for() function will be like first going to initialization ,then it goes to checking condition and the goes inside the loop. Then again it goes to third condition and then checks again and goes to inside the for loop.
Now,when fun() is called at time of initialization it return 25 and decrements to 24. then in checking condition it returns 24 decrements to 23, then it prints 23 and decrements to 22.
Like this it will work until the condition is satisfied.