0

What's the output of this code and WHY/ EXPLAIN cout << (((1||0)&&0)||(1||0)) ;

cout << (((1||0)&&0)||(1||0)) ; !?!?!?!?!?!?!?!?!!??!!??!

30th Jan 2017, 3:34 PM
Amr Monsef
Amr Monsef - avatar
3 Answers
+ 13
the explanation given by hasty is correct but if u want the solution in less time then just see the right () and || before it, so ....anything || (1||0) =1
30th Jan 2017, 4:05 PM
‎‏‎‏‎Kueen
‎‏‎‏‎Kueen - avatar
+ 9
(((1||0)&&0||(1||0)) (1&&0||1) 0||1 1 This isn't even half bad when compared to the latest batch of validity questions rolled out of the oven.
30th Jan 2017, 3:40 PM
Hatsy Rei
Hatsy Rei - avatar
+ 1
I like this type of questions very much. It fun fun to answer them especially the lengthy one. With many operators. :)
31st Jan 2017, 4:40 AM
NEVEN RAJ KAUNDER A/L SIVA RAJA -
NEVEN RAJ KAUNDER A/L SIVA RAJA - - avatar