C - pointer behavior with pre and post increment

前端 未结 6 1432
日久生厌
日久生厌 2021-01-22 08:50

In am doing some experiment in C pointers and trying to understand its behaviour. The following are my assumptions for the below codes. Correct me if I am wrong. I have the foll

6条回答
  •  感动是毒
    2021-01-22 09:06

    Because of the operator precedence *pt++; is the same as *(ptr++); so it increments the pointer, then dereference the pointer and does nothing.

提交回复
热议问题