summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/OR_PRACTICAL_C/12_3.c
blob: f608eb37302f83b13895baa39313ebf23889aea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#define ARRAY_SIZE 10   /* Number of characters in array */
/* Array to print */
char array[ARRAY_SIZE] = "012345678";   

main()
{
    int index;  /* Index into the array */

    for (index = 0; index < ARRAY_SIZE; index++) {
        (void)printf(
            "&array[index]=0x%x (array+index)=0x%x array[index]=0x%x\n",
            &array[index], (array+index), array[index]);
    }
    return (0);
}