Explanation of C language pointers and pointer Variables
Pointer and pointer variable:
The pointer is the address, and the address is the pointer.
The address is the memory unit number.
The pointer variable is the variable that stores the address.
Pointers and pointer variables are two different concepts.
We usually refer to pointer variables for short as pointers. Actually, they have different meanings.
Pointer importance:
Indicates some complex data structures
Fast data transfer
Returns more than one value to the function.
Direct access to hardware
Easy to process strings
Is the basis for understanding references in object-oriented languages.
Pointer definition:
The pointer is the address:
Memory Unit number
A non-zero integer starting from zero
Range: 4G (0 ~ 4G-1)
Pointer
The pointer variable stores the variable of the memory unit number in time, or the pointer variable is the variable that stores the address.
Pointers are essentially non-negative integers restricted by operations.
Pointer classification:
Basic Type pointer
Pointers and Arrays
Pointers and functions
Pointer and struct
Multilevel pointer