0

why output is 1?

#include<stdio.h> int main() { int a=2,b=4; printf("%d",a&&b); return 0; }

2nd May 2020, 1:01 AM
Kawser
Kawser - avatar
1 Answer
+ 1
When comparing two things, if they are non-zero, they are interpreted as 1 ( true ).
2nd May 2020, 1:19 AM
Mustafa K.
Mustafa K. - avatar