Write code to swap the very first and the very last values in the array. Declare an array to hold 500 integers. In the declaration statement, initialize the array so the very first value is 2, the second is 4, and all the rest are 0. Write a function to cube the first N elements in an array of doubles. The function should be passed the array and the number of elements to be cubed. It returns nothing.