#include <stdio.h>

int main() {
    // An array of four elements.
    // Remember that "a" is a "constant pointer".
    int a[] = {10, 20, 30, 40};

    // A loop variable.
    int i;

    // Print the array elements and their address
    // using array subscript syntax in the reverse
    // order, i.e. i[a] where i is the index.

    for (i = 0; i < 4; i++) {
        printf("a[%d] value = %d address = %zu\n", i, i[a], &i[a]);
    }

    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: