Home > Back-end >  C pointer
C pointer

Time:02-13

Pictures of type p is not a pointer variable, is of an address, why can make operation to p, don't adapt to p points to the address of the seaborne do operation, and the myp received is not an address too? Anyone who can help me to understand it, thank you!!!!!!

CodePudding user response:

Pointer is a variable pointing to an address, the address is immutable but pointer is variable, so you can change the pointer to do something,
For an example of the simplest bought a new house the house is your house in xx district xx unit you can say this is XXX 201
But if you move it won't take the house address new district is your home at that moment, your house is another address the

Your home this variable is equivalent to a pointer
Pointer can point to A also can point to point in A or B to B when you can be used to operate A or B,

CodePudding user response:

As you say the p type is a pointer variable, is of an address, in the figure on p operation, save the new address, pointing to the other variables, like ordinary variable type int can you give his assignment, why can't pointer is also variable operation? Pointer to store an address, the address in memory holds a value, a pointer referenced by * solution can take to the value of the pointer to by pass arguments Pointers can operate a pointer to a value
  • Related