int a = 1; float * p = & ampa;
This transformation can be compiled, but it is completely meaningless, mainly depending on the binary storage mode of float, and the resulting structure may not be what you want.
I feel that there is something wrong with the sentence "an int* pointer can only be assigned an element address of type int". LZ is just an int and a float (or double). If you use short or char to convert int, you can actually get the correct answer. Give a warning at most when compiling.
int a = 1; float * p = & ampa; char * p 1 = & amp; a;
The result of *p should not be 1, but the result of *p 1 must be 1.