1.

Predefined function reverse() in C++ is available under which header file?(a) math(b) stdio(c) stdlib(d) algorithmThis intriguing question comes from Arrays Types topic in chapter Arrays Types of Data Structures & Algorithms IThe question was posed to me by my school principal while I was bunking the class.

Answer»

Right answer is (d) ALGORITHM

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.



Discussion

No Comment Found

Related InterviewSolutions