Oct 26, 2010

Find the output.

main()
{
int i=-1;
+i;
printf("i = %d, +i = %d \n",i,+i);
}
what's the output??


Answer: 
i = -1, +i = -1

Explanation: 
   Unary + is the only dummy operator in C. Where-ever it comes you can
just ignore it just because it has no effect in the expressions (hence the
name dummy operator).