Lesson 15 of 50
cArrays
8 mins
Course progress30%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 15 of 50
c8 mins
Keep these ideas in mind as you work through the lesson.
An array is a contiguous block of elements of the same type.
int numbers[5]; // uninitialized (indeterminate values)
int initialized[3] = {1,2,3}; // static initialization
int auto_init[3] = {0}; // all zeroes
You can obtain the number of elements with sizeof(arr) / sizeof(arr[0]). Multi‑dimensional arrays are arrays of arrays (row‑major order).