I'm a beginner at c++ I got these questions for homework. Would appreciate answers to these questions.
Consider the following code for these questions
const int NUMBER_OF_ITEMS = 5; double nums [NUMBER_OF_ITEMS];
What is the index of the first and last element in the array?
Write a statement to store the value 5.6 in the 3rd location of the array, and another statement to output the 3rd location of the array to the console.
Write a loop that will fill up the array by asking the user for input.
Write down some code to output all the elements of the array that are greater than 22.
What is the meaning of the word 'const', and give one good reason why it is good to declare a const variable for the size of an array?