C examples for Array:Array Element
To print the entire contents of an array, use a looping structure.
#include <stdio.h> int main() {//w ww .j a v a2 s . co m int x; int iArray[5]; //initialize array elements for (x = 0; x < 5; x++) iArray[x] = x; //print array element contents for (x = 0; x < 5; x++) printf("\nThe value of iArray index %d is %d\n", x, x); }