C examples for Array:Array Element
Declare a single-dimensional array
#include <stdio.h> int main( void ){ int elements[10]; //w w w . ja v a2 s . c om for (int idx = 0; idx < 10; idx++) elements[idx] = idx ; for (int idx = 0; idx < 10; idx++) printf( "\nelements[%d] = %d ", idx, elements[idx] ); return 0; }