Friday, November 25, 2011

Easy-2

This is second in line with the easy posts.. after a while we shall move onto more tricky ones.. A problem a day keeps the Alzheimer's away.

void main()
{
static int i=i++, j=j++, k=k++;
printf(“i = %d j = %d k = %d”, i, j, k);
}

Guess the output !!

1 comment:

  1. Here's a hint.. static variables are automatically assigned to 0 so the values will be incremented by 1 and printed !

    ReplyDelete