Complete the code to declare an integer array named numbers with 5 elements.
int numbers[[1]];The array size must be specified inside the square brackets. Here, 5 means the array can hold 5 integers.
Complete the code to initialize the array with values 1, 2, 3, 4, 5.
int numbers[5] = [1];
Arrays in C are initialized using curly braces with comma-separated values.
Fix the error in the array initialization to correctly initialize an array of 3 floats.
float values[3] = [1];
Float arrays are initialized with curly braces containing float values separated by commas.
Fill both blanks to declare and initialize an array of characters with the letters 'a', 'b', 'c'.
char letters[[1]] = [2];
The array size is 3 for three characters, and characters are enclosed in single quotes inside curly braces.
Fill all three blanks to declare and initialize an integer array with values 10, 20, 30, and access the second element.
int arr[[1]] = [2]; int second = arr[[3]];
The array size is 3, initialized with three values. The second element is at index 1 because C arrays start at 0.