// # Include <stdio. h> int main () {int * P, I = 2; // int * must be of the same Integer type P = & I; Int J, * g = & J; // The pointer is a variable whose value is the memory address./* The declared int * is a pointer type, the address of an integer variable, and the number of the memory unit; 1 first p saves the address of I p points to I; 2. P is not I, I is not P. Changing P does not change I, and modifying I does not change P. It is two different variables. 3. if a pointer variable points to a common variable, * the pointer variable is equivalent to a common variable. 4.*5. the address is the number of the memory unit. The mutual change between I and P will not change the value of the other party. Unless it is added */*, it indicates that the complex data structure is used to quickly transmit data. Instead, the function returns more than one value directly. easy to process strings with access to memory is the basis for understanding object-oriented references * // * pointer Classification 1 Basic Type pointer 2 pointer and array 3 pointer and function 4 pointer and struct 5 Multi-level pointer * // * three lines of CPU processing memory control data address line-> C-> internal * // * 32-bit 32-bit address bus 2 32-power byte address number 0 = 4g-1; subtraction in only four arithmetic operations with pointers */}
# Include <stdio. h> int main () {int I = 5;/* int I; Define I = 5; initialize */int * P; int * q; P = & I; /** q = p */syntax error/* int * is different from int type */** q = * p */Q unallocated memory address/* P = Q; */Q is a spam value/** q = * p */Wood allocated address}
Notes -------- pointer