An array stores a fixed number of same-typed elements next to each other.

Arrays

arrays.c
#include <stdio.h>

int main(void) {
    int base = ;
    int scores[3] = {base, base + 10, base + 20};
    int first = scores[0];
    int last = scores[2];
    int total = first + last;

    printf("first=%d\n", first);
    printf("total=%d\n", total);
    return 0;
}
#include <stdio.h>

int main(void) {
    int base = ;
    int scores[3] = {base, base + 10, base + 20};
    int first = scores[0];
    int last = scores[2];
    int total = first + last;

    printf("first=%d\n", first);
    printf("total=%d\n", total);
    return 0;
}
#include <stdio.h>

int main(void) {
    int base = ;
    int scores[3] = {base, base + 10, base + 20};
    int first = scores[0];
    int last = scores[2];
    int total = first + last;

    printf("first=%d\n", first);
    printf("total=%d\n", total);
    return 0;
}
array `int scores[3]` creates storage for three integers.
index Array indexes start at zero, so `scores[0]` is the first element.