The fourth day of C language learning

Time:2022-5-24

C language

  1. Relational operators and expressions

    1. Six in total

      >
       <
          ==
          >=
          <=
          !=
    2. The relationship expression has two values, true and false

    3. True can be represented by true or 1

    4. False can be represented by false or 0

  2. Logical operators and logical expressions

    1. Three in total

      &&The and binocular operator of other languages requires two more operands on both sides
          ||Or equivalent to the or binocular operator of other languages, which requires two more operands on both sides
          !   Not equivalent to not unary operators in other languages
    2. Logical operators connect relational expressions, which are logical expressions

    3. The value of logical expression is the same as that of relational expression, true or false

    4. &- address symbol, & & – logical expression, and

    5. When making logical judgment, all values not equal to 0 are true

    6. In the logical expression, as the operation object participating in the logical operation, if it is 0, it means false, if it is not 0, it means true

    7. The logical operation result given by the system is either 0 or 1. It cannot be other values