the definition of a pointer variable:
the variable that holds the address is called the pointer variable1. The general form of defining pointer variables is as follows:
type name * pointer variable name 1,* pointer variable Name 2, ... * pointer variable name n;
For example:
int * X, *y, *z;
equivalent to:
int * X;
int * Y;
int * Z;
Example:
#include <stdio.h>
void Main ()
{
int x = 1;
int y = 2;
int* A; Declares a pointer variable a that points to an shaping variable
int* B; Declares a pointer variable B that points to an integer variable
A = &x; Assign the X address to the pointer variable A, (A is equivalent to an address, and by &x, the address of X is pointed to a)
B = &y; Assign the Y address to pointer variable B. Ditto
printf ("x =%d \ n", *a); If the pointer variable points to a normal variable (that is: A = &x), then the pointer variable is equal to the normal variable (then: *a = x)
printf ("y =%d \ n", *b); Ditto
This shows that *a is equivalent to X, and because after assigning a value, A is equivalent to &x, then *&x equals x, so * and & inverse each other.
}
Daddy Amateur Mom Learning: C-Language Basics-pointers (pointer variables) Learning notes