Is Left associativity only for Postfix expression?

送分小仙女□ 提交于 2019-12-01 21:30:32

Yes.

See this handy table of C's operators.

The postfix operators are:

  • ++ and --
  • () (function call)
  • [] (array indexing)
  • . (member select)
  • -> (member select)

And they are all in the left-to-right precedence group (2) near the top of the table.

I guess the "why" is since that's how the language is defined. There are no "natural causes" for these kinds of things, they're human-made you know.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!