+ 6

Why is the output 0?

#include <stdio.h> int main() { int x=1-(-1==~0); printf("%i",x); return 0; }

24th Jan 2019, 6:34 PM
Zhenis Otarbay
Zhenis Otarbay - avatar
2 odpowiedzi
24th Jan 2019, 6:37 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 3
Because of return 0. You got what is on return.
24th Jan 2019, 6:35 PM
Hubert Dudek
Hubert Dudek - avatar