Start by posting it in plain text, with proper indentation, and the required header so it's easy to read, compile and run:
Code:
#include <stdio.h>
void fun(int);
typedef int (*pf) (int, int);
int proc(pf, int, int);
int main()
{
int a=5;
fun(a);
return 0;
}
void fun(int n)
{
if(n > 0)
{
fun(--n);
printf("%d,", n);
fun(--n);
}
}
Next, trace it by hand. This is a pain, and will likely involve lots of paper and pencil work, and a bit of time, but is excellent for helping you understand what code is doing. The more you practice this, the easier it gets to trace code and make sense of it in your head.
You're correct that fun(--n) calls fun with a value of 2 the first time (n was 3, and decremented before the function call), but when you call a function, even if called recursively, you start at the beginning of the function again. So you have to go back to line 15 (in my version) and check if (n > 0) for n==2, and go from there. Only when you're all done with the recursion (base case of if (n > 0) fails), will you begin to return from the recursive calls to fun(), and the printf will be executed. Note too, that after you print, you do another recursive call to fun, decrementing n again before the call.