1. A pointer is a variable that stores the memory address of a computer.
Int A; Define a variable
Int *p;//defines a P-pointer
p = &a;//and int *p = &a; equivalent
Depending on where you appear, the operator * can be used to declare either a pointer variable or a pointer value. When used to declare a variable, * means that a pointer is declared here. Other cases use * to indicate the value of the pointer.
& is an address operator that can reference a memory address. Use the & operator before the variable name to get the memory address of the variable.
2. An array is a contiguous memory space that can store specific objects and pointers to store a single memory address. You can assign the address of the array to the pointer, and the pointer to the address of the first element of the array.
Int Arr[3] = n/A;
int *p = arr;//and int *p = &arr[0]; equivalent;
3. As with arrays, pointers to structs store the memory addresses of the first element of a struct.
4. The pointer's pointer holds the memory address of the first pointer
If P1 stores the P2 memory address, then *P1 is returning the object that P1 saved.
&: Take address. *: Value.
C-pointer essay