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

Time:03-09

Excuse me, ladies and gentlemen, in this code, why p=p + 1 is the address of the corresponding p plus 1, and the values of the m
# include
Void f (int * p, int * q);
The main ()
{
Int m=1, n=2, * r=& amp; m;
F (r, & amp; N);
Printf (" % d, % d ", m, n);
}
Void f (int * p, int * q)
{
P=p + 1;
=* * q q + 1;
}

CodePudding user response:

Because p=p + 1 + 1 is the address values, not address values to the contents of plus 1.
Unlike the=* * q q + 1; The content of the is q point to add 1.
  • Related