+1 vote
in Data Structures & Algorithms I by (110k points)
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 I

I had been asked this question in semester exam.

1 Answer

+1 vote
by (408k points)
selected by
Best 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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.