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

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

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

Answer: d
Explanation: The predefined function for rotating an array is rotate() in C++ which comes under the library called an algorithm. It requires 3 arguments the first being the pointer to the starting index of the array and the last being the pointer to the last index of the array. The middle argument is the pointer to the element that becomes the first element in the rotated array.

Comments