Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C language, assuming a p variable, if p is an integer, why does *p have to be an integer?
C language, assuming a p variable, if p is an integer, why does *p have to be an integer?

I don’t understand what you are expressing. The integer variable int is a variable that occupies 4 bytes of storage space, the char type is 1, the double is 8, but the pointer is a fixed 4 words. section (different platforms), its 4 bytes store the address of the variable, int *p; is an integer pointer, the pointer is very flexible, it does not necessarily only point to the integer type, because the integer type It occupies 4 bytes, so p can point to the first address of any variable and read the value of its first address and the following three addresses