QP School

Full Version: Declaring and initializing arrays
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Arrays are collections of elements of the same data type.

// Declaring an array of integers
int numbers[5];

// Initializing an array with values
int primes[5] = {2, 3, 5, 7, 11};