12
The rec function on the printf line is evaluated before the printf itself. Thus the deepest instance of the rec function is printed first.
Because you're creating 9 ambients 9 > 8 > 7 > 6 > 5 > 4> 3 > 2 > 1 > 0, now these ambients are treated the same this would a(b(c(d(e(f(g())))))), going from the deepest one to the first one.
Remember that when you do this printf("%d",n(m)); you're actually not printing anything, you're saying "print the result of n(m)" then when it tries to resolve n(m) you're calling another print and saying once again "resolve n(m-1)".
Now, when you reach n(0) it will return 0 to be printed by the last call of printf, therefore it prints 0 then 1 .. 9.