Hi, I'm going through the C-tutorial(beginner) and I want to know if I have understand it right.

Isnt really hard. (1 OR 0 is true) = false in this case.Code:A. !( 1 || 0 ) ANSWER: 0

These two I dont understand so well.Code:B. !( 1 || 1 && 0 ) ANSWER: 0 (AND is evaluated before OR) C. !( ( 1 || 0 ) && 0 ) ANSWER: 1 (Parenthesis are useful)

&& are operated before || so 1 && 0 is false because both numbers must be true. But what happens after that? Now we haveCode:B. !( 1 || 1 && 0 )

1 || FALSE and FALSE replaces 1 && 0. Could someone explain this? I was thinking if it would look like this after the &&-operation is done:

1 || 0 - the zero replaces the 1 && 0 wich was false. Am I thinking right?

And the last one:

C. !( ( 1 || 0 ) && 0 ) ANSWER: 1 (Parenthesis are useful)

the 1 || 0 is operated and is true(1) Then 1 && 0 is operated wich is false. The NOT-operator inverts this to true.