Tuesday, July 22, 2008

Array


An array is a contiguous block of memory location that identified by a particular name.


For ex:

A[4];

Initializing arrays.

int billy [5] = { 16, 2, 77, 40, 12071 };

Accessing the values of an array.

name[index]

For ex:

int billy [5] = { 16, 2, 77, 40, 12071 };

In that billy[0]=16

Multidimensional arrays

int jimmy [3][5];

0 Comments:

Post a Comment

<< Home