Reference book: learn C from scratch
Abstract 1. Arithmetic expressions, using arithmetic operators to concatenate operands, i.e. operands or operands, to form a formula that conforms to the rules of the C language and becomes an expression of an operation. In arithmetic expressions, operands include constants, variables, and functions. The law of arithmetic expression is similar to the law in mathematics. 2. The order of knowledge of arithmetic expressions is performed in the order of precedence of arithmetic, with high level and low execution level. 3. The expression of the assignment operator, for example: Assignment a=b, add Assignment a+=b equivalent to a=a+b, multiply assignment a*=b equivalent to a=a*b .... Wait a minute. 4. An assignment expression that has an assignment operator that joins an expression of one variable into an assignment expression. The general form is a=10 b=c+d a/=d+2 in which a semicolon is appended to these expressions and becomes an assignment statement. For expressions It is important to note that the left side of the assignment operator must be a variable, while the left side of the assignment expression can be said to be a variable or an assignment expression. When the left side of an assignment expression is an assignment expression, it should be enclosed with parentheses, such as (A=3*4) =4*6, and cannot be a=3*4=4*6. The expression to the right of an assignment expression can be an arithmetic expression, a relationship, a logical expression, and so on, or it can be an assignment expression. such as c2=c1=5. 5. Relational operators, which are the operators used to compare the size of these two operands, are actually a "comparison operation", the result of which can only be 0 or 1, when the comparison is established, the result is 1, and the result is 0, so the result type of the relational operator is an integral type. 6. A logical operator is a symbol that evaluates to two expressions or logical values that contain relational operators, and the result of the operation is a logical value. Logical expressions, expressions made up of logical operators are logical expressions, objects of logical operations are usually relational expressions, logical expressions, can also be arithmetic expressions, assignment expressions, and other expressions. Example: a>10&& a<15 The operand of the logical expression is the relationship expression ! (a "=10") &&! (a =15) logical expression is a logical expression (M=a B) && (n=c>d) the operand of the logical operator is an assignment expression t=++x| | ++y&&++z The operand of a logical operator is an arithmetic expression the same as a relational expression, the value of a logical expression is also a logical amount, when the logical amount is true, the value is 1, and the logical amount is false. The value is 0.
These are the contents of this study, the main explanation is the use of operational symbols, the expression of the operation, usefulness and so on.
Learn C language from scratch 3