Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - The address of & ampa is an integer value, so can't I assign this value to an integer variable?
The address of & ampa is an integer value, so can't I assign this value to an integer variable?
Open a trumpet to answer the upstairs second floor, misleading children!

& ampa is a pointer, occupying 2 bytes of memory space, and integer variables occupying 4 bytes. Therefore, the answer cannot be assigned: riding a mad cow and hitting a traffic policeman | Level 4 | 201-6-219: 01.

One is an integer variable, and the other is an address value, which definitely cannot be assigned directly. Responder: lmqwudi | Level 2 | 2011-6-313:19.

First of all, you can't say how big the pointer is. It is stipulated by the system platform. According to the widely used 32-bit computer, the size of the pointer is 4 bytes. Secondly, integer variables and address values can be assigned directly, and the final type is the type on the left of the equal sign, but you must specify the type of cast, otherwise -wall will give a warning when it is opened.