Program Console Vignaankosh.com
Execution Panel
Console is empty.
Find length/size of array using sizeof() is an interactive C dry run visualizer from the Arrays 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[] = {1, 2, 3, 4, 5, 6, 7, 8};
// sizeof(arr) returns total bytes of array
// sizeof(arr[0]) returns bytes of one element
int length = sizeof(arr) / sizeof(arr[0]);
printf("Total array size in bytes: %lu\n", sizeof(arr));
printf("Size of one element: %lu\n", sizeof(arr[0]));
printf("Number of elements: %d\n", length);
return 0;
}