+ 5
why cout<<true&&false; is true in sololearn
Go to new CPP code and type cout<<true&&false; it will return 1 while it should return 0
6 Antworten
+ 6
because cout first execute true so that the ans is 1. which means true..
+ 4
yep, true Shekhar
cout<<false||true; also gives 0
but if u use ()braces this problem won't occur
cout<<(false||true); is 1
+ 2
No its supposed to return 1. This is because the first thing the cout function comes across is "true". Therfore it will print 1
+ 1
Its because the "operator precedence", which should to evaluate first.
Sorry my english.
0
muy linda
- 3
i would say aweaome observation