Guess the output . | Sololearn: Learn to code for FREE!

+12

Guess the output .

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

6/11/2017 4:54:25 AM

Prabhu Nithin

11 Answers

New Answer

+12

you're right

+10

it's not yet approved .

+10

Is it because of right to left associativity ?

+10

thanks @calvin

+6

+5

ya exactly @calvin

+4

+4

see this https://code.sololearn.com/cFq2qYBGW5GC/?ref=app

+3

&& has higher precedence order then ||

+2

Put to your factory quiz.

0

0&&0 = 0 (false) 0||1 = 1 (true)