Hello,

This is my first post on Cprogramming.com as i have just got started with learning C++ from the tutorial area on this website which at the moment is going quite good. However i'm onto the part what explains about the NOT, AND, OR operators. I'm at the last section of the IF statements page currently where it gives an example of the following below:

Does the first example (A) does the OR operator take place first? So the 1 || 0 would be TRUE and then the NOT operator comes in and changes it to False which gives it a value of 0?A. !( 1 || 0 ) ANSWER: 0

B. !( 1 || 1 && 0 ) ANSWER: 0 (AND is evaluated before OR)

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

Is that how it works?

many thanks, Josh.