At first instance it seems to be 15 20 15 20 but actually I executed the code and got: 15 20 15 15
What I think is: the change happens at the initialization of x variable in the print2() func
In print1() initialization of value 10 is done at the time of declaration. because of static only one memory created at static storage and that value is updated which 15 then 20
now in print2() initialization is done after declaration. when memory is created one time its OK. first time value is 15 but next time when it is called and reach to x = 10 it updates the value of x to 10 first and then add 5 to it. which is again 15
hence the output: 15 20 15 15
Note: it's purely my analysis if anyone found it incomplete then please complete it!