+1 vote
in Data Structures & Algorithms I by (110k points)
Which of the following is the predefined function for array reversal in C++?

(a) rotate()

(b) arr_rotate()

(c) array_rotate()

(d) rot()

My question comes from Arrays Types in section Arrays Types of Data Structures & Algorithms I

I got this question by my school teacher while I was bunking the class.

1 Answer

+1 vote
by (444k points)
selected by
Best answer
Right option is (a) rotate()

To explain: The predefined function for rotating an array is rotate() in C++. It is defined under the library algorithm and requires 3 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.