The Index Operator []
The phrase
identifier [ expression ]
provides indexed access to an element of the
array referred to by identifier, namely, access
to the element with subscript equal to the value of
expression.
Examples:
freq[1+2+3] = 17; // set freq[6] to 17.
grade = 6;
freq [grade] = 0; // set freq[6] to 0.
// Increment freq[6] by 1.
freq [grade] = freq[grade] + 1;