C language basics - OPERATORS AND EXPRESSIONS
Author: Yin Zhengjie
Copyright: original works, declined to reprint! Otherwise held liable.
A commonly used operator classification
1>. Arithmetic Operators
For processing four arithmetic operations.
2>. Assignment operator
For the expression of the value assigned to the variable.
3> comparison operators
For comparison expression, and return a true or false value.
4>. Logical Operators
It used to return true or false value depending on the value of the expression
5>. Bitwise
Bit operation for processing data.
6> .sizeof operator
Length number of bytes used to find.
Two arithmetic operators
The term & exemplary results operator
+ plus +3. 3
- Negative No. -3-3
+ 15 plus 10 + 5
- Subtraction 10--510
* 10 * 550 multiplication
/ addition to the 10/52
% Whichever modulus (remainder) 10 31%
increment ++ before a = 2, b = ++ a ; a = 3; b = 3;
increment after 2 = A +, B + A =; =. 3 A; B = 2;
- before decrement = 2 A; B = - A; A =. 1; B =. 1;
- Save since a = 2; b = a--; a = 1; b = 2;
III. Assignment operator
Operator exemplary term results
IV. Comparison Operators
V. Logical Operators
VI. Operator Precedence
VII. Type Conversion