Assume that the vector arr has been declared. In addition, assume that VECTOR_SIZE has been defined to be an integer that equals the number of elements in arr. Write a statement that assigns the next to last element of the vector to the variable x (x has already been declared).

Respuesta :

Answer:

x=arr[VECTOR_SIZE-2];

Explanation:

We have the vector named arr ,VECTOR_SIZE and integer x.To assign the value of next to last element of the array to the variable x which will be stored on the index VECTOR_SIZE-2 we have to use assignment operator(=) for doing that.  Assignment operator assigns the value of the right of the operator to the variable on left of the operator.