Arrays
| Lesson overview |
Lesson overview
Topics covered: Declaration, initialization, and access of C arrays.
Arrays
Declaration: int arr[10]; - array of 10 integers
Initialization: int arr[5] = {1, 2, 3, 4, 5};
Access: arr[0] - first element, arr[4] - fifth
Size: use sizeof(arr) / sizeof(arr[0]) to get count
int numbers[] = {10, 20, 30, 40, 50};
Article author: Arthur Isaev