0
Need explanation of this code.
I want to know how "printf(" %d", a || b");" outputs 1. Thank you. https://code.sololearn.com/cDyWW6abTQPn/?ref=app
1 Answer
+ 6
Any non-zero number is true and 0 is false......
|| is OR operator ... it returns 1 if either of the 2 inputs is true....here 2 and 4 is true as both are non-zero...
So 2||4 gives 1.....