I am confused with pointer type casting. I read that i cannot type case an integer pointer to float pointer. Am I correct? The code is
or can i take blindly that pointers should never be type casted?Code:#include <stdio.h> int main(void) { int value=0x20FE; float *fp; int *p = &value; fp = (float *)(&value); printf("int value = %f\n", fp); printf("char ptr value = %d\n",p); return 0; }