Device Monitoring Studio - Monitor, log and analyze data coming through PC ports and connections
Download Device Monitoring Studio Hide this button

[] Array Indexing Operator

Array indexing operator allows you to reference individual array items.

Syntax:

id[exp]

The following code fragment illustrates the use of the array indexing operator:

struct A
{
    int Array1[10];         // static array of 10 integers
    int Array2[Array1[2]];  // dynamic array, which size is taken from the third value of Array1 array
};    

Array elements are numbered from 0 to Count - 1, where Count is (static or dynamic) array size.