C examples for Array:Array Element
Here is how to initialize an array.
int iArray[5] = {0, 1, 2, 3, 4};
Another way to initialize your array elements is to use looping structures such as the for loop.
#include <stdio.h> int main() // w w w . ja v a 2s . c om { int x; int iArray[5]; for ( x = 0; x < 5; x++ ) iArray[x] = 0; printf("Arrays initialized"); }