I decided to help you with your learning by providing you with actually compilable code which, I am convinced, will further exactly the same learning goals as what you are currently studying. I will of course not provide you with the output of the shown code (or the shown code changed to be compilable). For two reasons. One: I don't want to do the quiz for you. Two: I want to help you learn, not hinder you.
So this code, if compiled and run:
#include <stdio.h>
int funky(int x)
{
printf("in %d, ", x);
if (x > 0)
{
x -= 1;
printf("mid %d, ", x);
funky(x);
}
printf("out %d, ", x);
}
int main()
{
funky(/* x passed in as */ 5);
return 0;
}
will get you the hopefully enlightening output:
in 5, mid 4, in 4, mid 3, in 3, mid 2, in 2, mid 1, in 1, mid 0, in 0,
out 0, out 0, out 1, out 2, out 3, out 4,
It supports your understanding by making obvious which output is caused by which code part. I added a second and third output to help you understand the recursion trickery used in the quiz code. And I added a newline to the output, simply for readability here. (Side effect of intentionally not giving the character precise output here...)
With the syntax fixes in the code I intend to answer the side questions in your post, while the real puzzle is clarified by the visualisation of the relevant values before and after the recursive call.