Home > Back-end >  C language pointer
C language pointer

Time:11-16

P++ and * (p + 1) is the same meaning, is behind the pointer to move a

CodePudding user response:

P++ is pointer
* (p + 1) is a pointer to the value of the
P++ and p + 1 also depends on the contextual to determine whether the same
* (p + 1) and * (p++) in different contextual point to the value of the may or may not

CodePudding user response:

It should be said that some cases, p++ and p + 1 is the same, * (p + 1) values

CodePudding user response:

They are in these two examples pointer back one is

CodePudding user response:

I want to ask what's the difference between them in pointer, I see example role as both is the same, is a pointer to objects to offset another unit

CodePudding user response:

P++ ward a pointer position, reoccupy * p value of is, the value of the next position
Is (p + 1) after taking a pointer, pointer pointing to the value of the p * p is the value of the original position

CodePudding user response:

Is different, p++ p + 1 to p, and * (p + 1) is the address of p + 1, but not assigned to p, that is the difference between the two: p++ and p + 1 is not the same, whether to modify p
  • Related