+ 1
Can anybody please explain the output
#include<stdio.h> int main() { int b=5&6&7; printf("%d",b); } Output:- 4
2 Antworten
+ 2
Bitwise and operator (&) takes two numbers as operands and does AND on every bit of two numbers. The result of AND is 1 only if both bits are 1.
So as Jay Matthews explained the answer should be 4 as
101&110
=100
100&111
=100=4
+ 1
Thnx