Level 57 Level 59
Level 58

[No Typing] Arrays

11 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

a kind of data structure that can store a fixed-size sequential collection of elements of the same type
Declaring Arrays
type arrayName [ arraySize ];
Initializing Arrays
double balance[5] = {1000.0, 2.0, 3.4, 7.0, 50.0};
Accessing Array Elements
double course = balance[9];
Multi-dimensional arrays
C supports multidimensional arrays. the simplest form of the multidimensional array is the two-dimensional array.
Passing arrays to functions
You can pass to the function a pointer to an array by specifying the array's name without an index.
Return array from a function
C allows a function to return an array.
Pointer to an array
You can generate a pointer to the first element of an array by simply specifying the array name, without any index.
type name[size1][size2]...[sizeN];
the general form of a multidimensional array declaration
Two-dimensional Arrays
type arrayName [ x ][ y ];
int val = a[2][3];
Accessing Two-Dimensional Array Elements