245 views

1 Answer

1 votes
1 votes
printf("%d", -1&&1);
printf("%d", -1&&-1);

Is TRUE since in C,it just cares about Zero and Non-zero and since both the side of AND operation it has non-zero number it gives TRUE value 

Related questions

0 votes
0 votes
1 answer
2
3 votes
3 votes
1 answer
3
dd asked Jun 27, 2017
522 views
#include <stdio.h int main() { unsigned int m = 0; m |= 0xA38; printf("%x\n",m|(m-1)); printf("%x\n",( (m|(m-1)) + 1 ) & m ); }Find the output ?
0 votes
0 votes
1 answer
4
Beyonder asked Apr 16, 2016
657 views
The valid pointer operation is assigning or comparing to zero in CCan anyone explain this statement?