Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C language: define an integer variable int a;; ; The address (pointer) of A occupies 4 bytes, and the variable A itself occupies 4 bytes.
C language: define an integer variable int a;; ; The address (pointer) of A occupies 4 bytes, and the variable A itself occupies 4 bytes.
Understand it this way.

Int type A occupies 4 bytes of memory space, assuming its address is 0x 12ff88.

That is to say, A occupies the size of 4 bytes from 0x 12ff88.

Then if you want to represent its address, you need to add a 4-byte variable to store this 0x 12ff88, which is a pointer.