+ 2
Why output is 1 ?
Code : #include <stdio.h> int main() { int x,y,z; x=y=4; z=x==y; printf("%d",z); }
1 Resposta
+ 2
x == y returns true, and if you convert a Boolean true to an integer it becomes 1
Code : #include <stdio.h> int main() { int x,y,z; x=y=4; z=x==y; printf("%d",z); }