+ 1

#why output b=100 not 300? please explain.

int main() { int a=500,b=100,c; if(!a>=400) b=300; c=200; printf("b=%d c=%d\n", b,c); return 0; }

18th Jan 2018, 2:43 AM
Kishore Kumar Biswas
Kishore Kumar Biswas - avatar
4 Respostas
+ 3
I thought that. But I was little bit confused. Thank you Jamie
18th Jan 2018, 2:51 AM
Kishore Kumar Biswas
Kishore Kumar Biswas - avatar
+ 1
But Jay it also works fine. so what should choose between (!a>=400) and ! (a>=400)?
18th Jan 2018, 5:14 AM
Kishore Kumar Biswas
Kishore Kumar Biswas - avatar
+ 1
Yes Jay is right.
18th Jan 2018, 11:47 AM
Kishore Kumar Biswas
Kishore Kumar Biswas - avatar