printf

What is the output of the following program considering an x86 based parameter passing sequence where stack grows towards lower memory addresses and that arguments are evaluated from right to left:

int i=10;
int f1()
{
static int i = 15;
printf("f1:%d ", i);
return i--;
}
main()
{
int i, j;
i = 5;
printf("%d %d %d", f1(), f1(), i);
}

OKay, I'll bite. I'm not going to run any code.

Firstly the first i=10 is irrelevant, just like the j.

The 1st call to f1() will return 15 and print "f1:15 ".
The 2nd call to f1() will return 14 and print "f1:14 ".

Then you will get "14 15 5", I reckon.

This is homework, and even thougt porter has answered, I am still closing this thread. Note that you should be doing your homework yourself and not asking for such direct help over the forums.