Ask Question
30 July, 12:48

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.

+2
Answers (1)
  1. 30 July, 15:42
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers