Complete the code to declare an array of 5 integers.
int numbers[[1]];The array size must be specified as 5 to hold five integers.
Complete the code to access the third element of the array.
int third = numbers[[1]];Array indexing starts at 0, so the third element is at index 2.
Fix the error in the code to correctly initialize the array with values 1 to 5.
int numbers[5] = {1, 2, 3, 4, [1];
The last element should be 5 to complete the sequence from 1 to 5.
Fill both blanks to create a loop that sums all elements in the array.
int sum = 0; for (int i = [1]; i [2] 5; i++) { sum += numbers[i]; }
The loop starts at 0 and runs while i is less than 5 to cover all elements.
Fill all three blanks to create a loop that finds the maximum value in the array.
int maxVal = numbers[[1]]; for (int i = [2]; i [3] 5; i++) { if (numbers[i] > maxVal) { maxVal = numbers[i]; } }
Start maxVal with the first element at index 0, loop from index 1 while i is less than 5 (index 4 is last).
