Ask Question
5 March, 08:38

Assume that an array of integers named salarySteps that contains exactly five elements has been declared. Write a statement that assigns the value 160000 to the last element of the array salarySteps.

+5
Answers (1)
  1. 5 March, 10:34
    0
    salarySteps[4]=160000;

    Explanation:

    An array is the collection of elements of the same data type. Its size needs to be mentioned at the time of declaration and it is declared using following syntax: data_type array_name [array_size]; for eg: int a[4]; To allocate some value to any index we can directly use its index value. The array's index starts from 0. So, if an array has 5 elements, then the index of the last element will be 4.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Assume that an array of integers named salarySteps that contains exactly five elements has been declared. Write a statement that assigns ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers