One. Relational operators
Relational operators, which are important in C and mainstream languages, are used to compare operations. Includes more than (>), less than (<), equals (= =), greater than or equal (>=), less than or equal to (= =), and not equal to (! =) Six symbols.
Of course, the expression that is connected by the conditional operator is set, we say its result is true. (the C language mentioned above is true for non-0)
The result of the relational operation in C language. True "1", False for "0":
int 6 5 // a = 1; int 5 6 // a = 0;
Two. Logical operators
Logical operators include:
* Logic and &&
* Logic or | |
* Logical Non!
The result of the logical operator is also two, which is really "1", false "0"
Three. Conditional operators
Namely: three mesh operation; it is expressed in the following form:
variable = expression 1? Expression 2: Expression 3
Expression 1 is true, the result is an expression of 2, the expression 1 is false, and the result is an expression of 3
Four. sizeof
sizeof can be used to calculate the number of bytes of memory that a constant, variable or data type occupies. The written form is sizeof ();
C-Language Foundation small Vegetarian