C++ Deque rend()
C++ Deque rend() function returns a reverse iterator referring to the element preceding the first element in the deque container. An iterator can be incremented or decremented just like end() function.
Where, rend() stands for reverse end.
It does not contain any parameter.
It returns a reverse iterator pointing to the reverse end of the deque container.
Let's see a simple example
In this example, reverse iterator is used to iterate from backwards and it iterates until and unless it becomes equal to the c.rend().It prints the reverse content of a deque c i.e lairotuT
Let's see a simple example when reverse iterator is decremented by 2.
In this example, reverse iterator is decremented by 2. Therefore, it access the second element of deque.