pre Decrement vs. post Decrement

后端 未结 2 1215
-上瘾入骨i
-上瘾入骨i 2020-12-06 23:55

When should I use pre decrement and when to use post decrement?

and for the following code snippet, should I use pre or post decrement.

static privat         


        
2条回答
  •  星月不相逢
    2020-12-07 00:19

    you should have ++i; (not that it matters), and should have tempCounter-- Otherwise you will miss the "first" index of charArr

提交回复
热议问题