Logical Operation:
- Can judge whether two or more conditions are established, from three kinds;
- Logic, logic, logic, or the result is 1 and 0; true and false;
- && Logic and condition a&& condition B; only A and b result is 1 when it is 1;
- || logical OR; When a or b is established, the result is 1; none is established, 0;
- Any value has a true or false nature;
- The operation process; If the left is set up, it depends on the right side; This is for logic and; If the left is not true, the right side is not seen;
- int a = 10;int b = 10;int c = (a<5) && (++b>=11), the result of B is 10, because the latter is not executed;
- Logical OR; | | ; int a = 0 | | 10; the result is 1; If the left is set, the right side is not seen;
Logical Non:
- conditions require only one;! Add a condition after the exclamation point; take the counter action;
- Returns 0 if the condition is true, and returns 1 if the condition is not true;
- int a =!-19; 0; logical non-precedence is higher than >;
- int a =!! 10, can be used continuously multiple!, the result is 1;
Logic operations C && logic and etc.