Pointer variables for C language
In C, a variable is a fixed range of storage space, which stores the value assigned to him.
Like what:
int A ; /* here is the definition of an integer variable A, and the value of 12 is stored in the address space of a, the address space is the system randomly allocated, the user is transparent do not care * *
The pointer variable stores the address of the variable,
Like what:
int *b; = &A; /* as above, an integer variable A is defined and assigned a value of 12, an integer pointer variable b then takes the & value operator to the address space value of variable A, stored in the pointer variable b at this time the variable b is stored in variable A in the address space (this particular note, The pointer variable stores the address) */// / We can use the pointer operator * to fetch the value stored in the address space stored by the B pointer variable. int c; = *b; // now the value stored in C is the value of a.
Definition of pointer variable
int a = n, *b;
b = &a;
In programming, any variable must be defined and then assigned before it can be used, so remember Oh!
Pointer variables for C language