Step 1: void fun(); This is the prototype for the function fun().
Step 2: fun(); The function fun() is called here.
The function fun() gets a character input and the input is terminated by an enter key(New line character). It prints the given character in the reverse order.
Firstly in function fun() 'a' is entered then condition is checked. as it is not equal to '\0' so again fun() is called and this time 'b' is entered. similarly 'c' and at last in 4th recursive call of fuction fun()when enter is pressed, condition satisfies. so cursor goes to next line. now contol goes back to 3rd call of fun() in which c='c'.
Similarly control goes back to 2nd and 1st fun() call in which 'b' and 'a' get printed.