Home > Back-end > Pointer variable indirect reference array element
Pointer variable indirect reference array element
Time:10-18
For (p=a; P What is the meaning of this? P not said address? The for loop explanation/* */pointer variable pointing to an array element, what mean?
CodePudding user response:
Add and subtract said its pointer pointing in the direction of before and after the address of the mobile
10 elements of the array a of address is sequential, as a result, a + 10 is a after the last element of an address (a + 9 is the address of the last element), p shall not exceed the scope of the
P points to an array, the elements of a * p is pointed out by the location of the element's value
CodePudding user response:
P is a pointer, and a is the address of the first array, address + - equivalent to after moving forward, here is to array traversal
CodePudding user response:
Pointer value is the address, so the pointer + 1 + 1 is address, according to the results of this address of a pointer type to determine, if it is a char *, a byte address result becomes greater, if is int * increases 4 bytes, and so on