Assume that a vector of int named a has been declared with 12 elements and that the integer variable k holds a value between 0 and 6. Assign 15 to the vector element whose index is k.

.
.
Click on the title for the solution
.
.

This is the answer:

:

a[k]=15;

Comments