closed account (*LN3RX9L8*)

When you declare an array for example:

const int size=4;

int array[size];

what is the correct word to use to describe the [] in the array??

Thanks

const int size=4;

int array[size];

what is the correct word to use to describe the [] in the array??

Thanks

well in the line:

the [] just indicates it is an array and the value inside the square brackets is the size of the array.

When used like this:

the [] represents the index into the array.

`int` array[size];

the [] just indicates it is an array and the value inside the square brackets is the size of the array.

When used like this:

`array[i]`

the [] represents the index into the array.

Or if you mean the symbols themselves

(parentheses)

{braces}

[brackets]

So in array[5]

5 is the number of indices, array[4] is a reference to it's fourth index, and the numbers are surrounded by brackets.

(parentheses)

{braces}

[brackets]

So in array[5]

5 is the number of indices, array[4] is a reference to it's fourth index, and the numbers are surrounded by brackets.

Topic archived. No new replies allowed.