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).
.
.
Click on the title for the solution
.
.
x = arr[VECTOR_SIZE-2];
.
Click on the title for the solution
.
.
This is the answer:
:
x = arr[VECTOR_SIZE-2];
Comments
Post a Comment