C code output ?

Hii
Can anyone please explain me the output of this code

int main()
{
int i=0;
while(+(+i--)!=0)
i -= i++;
printf("%d",i);
getchar();
return 0;
}
I found it at :-
#-Link-Snipped-#

Replies

  • Varsha0802
    Varsha0802
    -32768, I guess, because the loop will not run. Tell me if I am correct or not.
  • deepasri
    deepasri
    output : -1

    in while loop i variable get -1 values then it is true
    next statment balance the value as i = -1
    then print -1 value.
  • Sachin Jain
    Sachin Jain
    @deepsari,
    You are right its output is -1
    Hey, Can you please explain in some steps...

You are reading an archived discussion.

Related Posts

I have made this poster about CrazyEngineers, which will be sent to various engineering colleges that look for media partnership with us. Have a look: I would like if you...
Does that really happen ?
Me and my team is going to design a solar powered car. And for that I am involved in making the chassis part that is to be made with steel...
Hello CEans, As you aware of our CE- Facebook Application, "The Engineering Purity Test", we require your suggestions to come up with the best. It was not officially launched yet....
Hi, My project is a license plate recognition system. It consists of two modules, the first one is a license plate detection & tracking module, which consists of the camera...