Hello Everybody,
I have a small confusion with regards to pointers. Here is some code
int main()
{
int *p1 = (int*)malloc(sizeof(int));
*p1 = 10;
printf("The number is %d",*(char*)p1);
}
I run the code and the O/p is 10. My question is, is there no difference in using char typecast as opposed to an int typecast ?