C++ Queue back() Function
C++ Queue function returns the value of the last element of the queue. Here last element is the one that is newest. The element which was most recently added is returned.
The function does not take any parameters. It is only used to return the value of the last element.
The function returns the last element of the queue.
newqueue.back() is modified to 104
The complexity of the function is constant.
The function accesses the container. For returning the last element the whole queue container is accessed and then the value of the newest element is given.
Guarantee as equivalent to the operations that are performed on the underlying container object is provided.