• C程序设计语言 -- 运算符优先级


    1. 运算符分类

    •   算术运算符            【+, -,*, /, % , ++, --】
    •  关系运算符             【>,  >=, <, <=】
    •  相等性运算符           [==,  != ]
    •  逻辑运算符             【&&, ||】(&& 高于 ||)
    •  赋值运算符             【 = 】
    •  按位运算符             【&, |, ^】

    2. 优先级与结合律

      ( ), [ ], ->, .                                                                从左至右

        !, ~, ++, --, +, -, *, & (type) sizeof()    从右至左

        *, /, %                                                                        从左至右

        +, -                                                                           从左至右

       <<, >>                                                                          从左至右

       <, <=, >, >=                                                                  从左至右

      ==, !=                                                                       从左至右

     &                                                                                   从左至右

     ^                                                                                    从左至右

     |                                                                               从左至右

     &&                                                                           从左至右

     ||                                                                                   从左至右

      ?:                                                                                 从右至左

      =, +=, -=, /=, %=, &=                                              从右至左

     ^=, !=, <<=,  >>=                                                          从左至右

     ,

  • 相关阅读:
    【BZOJ4892】【TJOI2017】—DNA(后缀数组+ST表)
    【BZOJ1563】【NOI2009】—诗人小G(决策二分栈优化dp)
    【洛谷P5249】【LnOI2019】—加特林轮盘赌(概率dp)
    【Ural1519】— Formula1(轮廓线dp)
    【BZOJ3728】【PA2014】—Final Zarowki(思维题)
    【BZOJ3730】—震波(动态点分治)
    【Hackerrank (70)】—Range Modular Query(莫队+暴力)
    【省选模拟】—Cactus(圆方树+dfs序)
    【BZOJ2125】—最短路(圆方树+树链剖分)
    python 基础 列表
  • 原文地址:https://www.cnblogs.com/zystechnology/p/7396402.html
Copyright © 2020-2023  润新知