logo CodeStepByStep logo

reverse

Language/Type: C++ vector traversals STL
Related Links:

Write a function named reverse that accepts a reference to a vector of integers as a parameter and modifies the vector to be in reverse order. For example, if the vector a stores {10, -2, 33, 55, 9}, the call of reverse(a) should modify it to store {9, 55, 33, -2, 10}.

Function: Write a C++ function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.