Here is the sample code for dereferencing void pointer.
1 2 3 4 5 6 7 8 |
#include<stdio.h> int main(){ void *ptr; char c='a'; ptr=&c; printf("\n %c \n",*(char *)ptr); return 0; } |
Here is the sample code for dereferencing void pointer.
1 2 3 4 5 6 7 8 |
#include<stdio.h> int main(){ void *ptr; char c='a'; ptr=&c; printf("\n %c \n",*(char *)ptr); return 0; } |