[Solved] Predefined function reverse() in C++ is available under which header file?

Predefined function reverse() in C++ is available under which header file?

a) math
b) stdio
c) stdlib
d) algorithm

Answer: d
Explanation: The predefined function for reversing an array is reverse() in C++ which comes under the library called an algorithm. It requires 2 arguments the first being the pointer to the starting index of the array and the second being the pointer to the last index of the array.

Comments