+ 3
Int a=2, b=4; printf("%d", a||b) ;
Find the output?
2 Antworten
+ 3
2 || 4 will yield true, as one of them at least is nonzero, so it will just print the number 1, because true is converted to 1.
0
output is 1.Because you are using logical OR operator.from the truth table of OR
true || true=true.true mean 1.false mean 0.a||b or 2||3 mean true.so that the output is 1.