Current location - Training Enrollment Network - Mathematics courses - What is an expression statement?
What is an expression statement?
Expressions can form statements independently, which are called expression statements.

The so-called expression refers to an effective sequence consisting of operators, operands and punctuation marks, and its purpose is to illustrate a calculation process.

One,

Expression statement, the expression statement in C language consists of an expression and a semicolon ";" Compose a composition. They are divided into the following categories: arithmetic expressions, assignment expressions, comma expressions, relational expressions and logical expressions.

1. Arithmetic expression refers to the formula composed of numbers and operation symbols in mathematics course, which can record or describe the calculation process and content simply and clearly.

In the development of advanced computer language, the program code that can meet the calculation requirements is written according to the requirements of language grammar rules by borrowing the artistic conception of expressions in mathematics.

2. Assignment expression is a common assignment operator provided by C language, also called equal sign operator.

3. Comma expression, a comma operator in C language, has the lowest priority. It concatenates two or more expressions and evaluates them one by one from left to right. The value of the whole expression is the value of the last expression.

4. Relational expression refers to the formula that connects two expressions with relational operators in computer programs.

5. A meaningful expression that connects relational expressions or logical quantities with logical operators is called a logical expression. The value of a logical expression is a logical value, that is, "true" or "false".

C language compiler system uses the number 1 to indicate "true" and the number 0 to indicate "false" when giving the logical operation result, but when judging whether a quantity is "true", it uses 0 to indicate "false" and non-0 to indicate "true".