- DataType identifier [constant integer expression];
-
// ok
int numbers[20]; // declare numbers to be an array of 20 elements each an integer.
char word[100]; // word can hold up to 100 characters.
// better
const int MAX_WORDS = 2000;
...
string dictionary[MAX_WORDS];
- DataType identifier [constant integer expression] = {item1, item2, ... itemN}; // the integer expression should be equal to N
-
char notes[7] = {'a','b','c','d','e','f','g'};
- DataType identifier [] = {item1, item2, ... itemN};
-
float gradeLowerBounds[] = {0.0, 0.6, 0.7, 0.8, 0.9};