Pointer
First, the address of the variable A is stored in another variable, such as in the variable B, and then indirectly by the variable B to reference the variable A, indirectly read and write the value of the variable A. Variables that are used to store variable addresses are called "pointer variables"
int *p=null; Initial value: null constant equals 0 variable type: integer pointer int *
The number of bytes in the pointer variable is only relevant to the operating system
Pointer type conversion%p
printf ("p =%p\n", p);
// C language when defining pointers, like to use p,q,r and so on. int *p = NULL; // The pointers we usually refer to are pointer variables // variable that holds the memory address (memory number) when the pointer variable. printf ("%p", p);
Fetch Address Characters &
int a = 3; int *p = &a;
Value operator *
int 3 ; int *p = &A; printf ("%d\n", *p); Char ' D ' ; char *q = &C; printf ("%c\n", *q);
The pointer's assignment represents the pointer's heavy direction.