If a pointer is declared with the type of int * the compiler assumes that the memory location held in the variable is an integer. Regardless of what is contained within that memory address as operations are performed relative to its base type.
double x = 1.23, y;
int *p;
p = (int *) &x;
y = *p;
printf("The incorrect value of x is : %f", y);
Above is a simple example. The output of y is incorrect. That's because y think it's an integer because the pointer is an integer when it isn't.
--
I'm wondering about the validity of the final line. Because
Pointer operations are performed relative to
the base type of the pointer.
is what the book says and I don't quite understand it.