int *a; int a*; int &a; int a&;
Depends on the type of x. p = *x; p = &x; p = ^x;
The result will be 0. The compiler will warn us. The program will crash. The pointer is automatically initialized.
double *p; int i; p = &i; *p = 10.0;
We mixed * with &. *p = 10.0; will overwrite other variables or code. p = &i; will generate an error. Nothing is wrong here.
1: 2: