Program Console Vignaankosh.com
Execution Panel
Console is empty.
Void pointer usage is an interactive C dry run visualizer from the Pointersintro programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.
This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.
#include <stdio.h>
int main() {
int i = 42;
float f = 3.14;
char c = 'A';
void *vptr; // Generic pointer
vptr = &i;
printf("Integer: %d\n", *(int*)vptr);
vptr = &f;
printf("Float: %.2f\n", *(float*)vptr);
vptr = &c;
printf("Char: %c\n", *(char*)vptr);
// Size of void pointer
printf("\nSize of void pointer: %lu bytes\n", sizeof(vptr));
// Note: Can't dereference void pointer without casting
// printf("%d", *vptr); // ERROR! Can't dereference void*
return 0;
}