About Lesson
You declare an array by specifying the data type of its elements, followed by square brackets []
and the array name. You can initialize the array at the time of declaration or later.
int numbers[5]; // Declaration of an array of integers with size 5
double values[3] = {1.2, 3.4, 5.6}; // Declaration and initialization of a double array
Join the conversation