An array is one block of memory
#include <stdio.h>
int main(void)
{
int marks[5] = {90, 75, 88, 60, 100};
int i, total = 0;
for (i = 0; i < 5; i++)
total += marks[i];
printf("Total %d, average %.2f\n", total, total / 5.0);
return 0;
}
int marks[5] reserves 5 x 4 = 20 bytes, side by side, no gaps. marks[3] means "go to the start of the array, skip 3 x 4 = 12 bytes, read 4 bytes". That single multiplication is why array access is fast, and why the index starts at 0 — the first element needs no skipping.
Prove it to yourself:
#include <stdio.h>