please explain output of if(x=10) else ???

#include
#include
int main()
{
int x= 10;
if (x=20) printf("true");
else printf("false");
getch();
}

output is true and x got the value of 20. [color=Red]why x got this value?[/color]

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories