Google
 
Webcprogramming.com




An Affiliate of AIHorizon




Declaring an Array

An array declaration requires the base type (the type that each element of the array will be -- .e.g., char or int), the name of the array, and the size of the array in square braces:
type name[size];
For instance,
int myArray[10];
declares an array of integers of size 10.

It is also possible to declare arrays with more than one dimension by the use of multiple square brackets, one for each dimension. A concrete example is declaring a 2-dimensional array:
int oneHundredElements[10][10];

-----
Interested in advertising with us?
Please read our privacy policy.
Copyright © 1997-2005 Cprogramming.com. All rights reserved.

Geodesy Designs