Ask Question

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.

+4
Answers (1)
  1. 16 April, 13:08
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers