int main() {
int a=345;
float b=8.3;
void *ptr;
ptr=&a;
printf("value of a is %d\n",*((int*)ptr));
ptr=&b;
printf("value of b is %f\n",*((float*)ptr));
return 0;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter