1.

Which of the following is the predefined function for array reversal in C++ ?(a) reverse()(b) arr_reverse()(c) array_reverse()(d) rev()My question is from Arrays Types topic in division Arrays Types of Data Structures & Algorithms II had been asked this question in semester exam.

Answer»

Right option is (a) reverse()

For EXPLANATION: The PREDEFINED FUNCTION for reversing an array is reverse() in C++. It is defined under the library ALGORITHM and requires 2 arguments.



Discussion

No Comment Found

Related InterviewSolutions