I have a program like below
Here my intention is to type cast the integer variable to a pointer and using thatCode:#include<stdio.h> int main() { int intVal = 10; short shVal; char chVal; char *pChar; pChar = (char *)&intVal; // pShort = &shVal; // pChar = &chVal; // intVal = 10; // *pShort = 20; // *pChar = 'q'; printf("intVal %c \n",(int *)pChar); return 0; }
pointer variable i want to display the value .
Can i know where am i missing..