Program Console Vignaankosh.com
Execution Panel
Console is empty.
Access array elements using pointer is an interactive C dry run visualizer from the Pointersarrays 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 arr[] = {10, 20, 30, 40, 50};
int *ptr = arr; // ptr points to first element
printf("Accessing array elements using pointer:\n");
printf("arr[0] = %d, *ptr = %d\n", arr[0], *ptr);
printf("arr[1] = %d, *(ptr+1) = %d\n", arr[1], *(ptr+1));
printf("arr[2] = %d, *(ptr+2) = %d\n", arr[2], *(ptr+2));
printf("arr[3] = %d, *(ptr+3) = %d\n", arr[3], *(ptr+3));
printf("arr[4] = %d, *(ptr+4) = %d\n", arr[4], *(ptr+4));
return 0;
}