Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在http://groups.google.co.in/group/comp.lang.c/browse_thread/thread/bfb312ad902d94eb/74dcdcacce777679?lnk=gst&q=conditional+operator#74dcdcacce777679
对于为什么(A%2==0)?A=0:A=1 给出错误的问题给出了答案。
我不明白我们什么时候使用(优先级和关联性)并且我们 使用 C 语法来解析表达式?
始终使用语法来解析表达式。
优先级和关联性来自语法,它们不是规则。许多优先表过于简化,在一些晦涩的极端情况下不起作用。