What are the historical reasons C languages have pre-increments and post-increments?

后端 未结 6 987
广开言路
广开言路 2021-02-08 12:32

(Note: I am not asking about the definitions of pre-increment vs. post-increment, or how they are used in C/C++. Therefore, I do not think this is a duplicate question.)

6条回答
  •  长发绾君心
    2021-02-08 13:31

    The PDP-11 had a single instruction that corresponded to *p++, and another for *--p (or possibly the other way round).

提交回复
热议问题