Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Int a=2, p = & ampa and * p = &;; A and *p=a, which is correct and why not?
Int a=2, p = & ampa and * p = &;; A and *p=a, which is correct and why not?
Int a=2, p = & Answer; ",assignment is incompatible. The integer variable p stores an integer value. A is the address of A, and the integer variable P cannot store the address value.

Int a=2, * p =&A; ",take the address of a to initialize the pointer variable p, correct.

Int a=2, *p=a, * Here is the specifier to declare the pointer variable p, "* p = a;" That is "int * p = a;;" , equivalent to "int * p;; p = a;” There is also an incompatible assignment.