Que has only font to acess but how p.back() is also working in queue please correct me where i am wrong

back() is also available for queue

Member functions of queue
(constructor) Construct queue (public member function )
empty Test whether container is empty (public member function )
size Return size (public member function )
front Access next element (public member function )
back Access last element (public member function )
push Insert element (public member function )
emplace Construct and insert element (public member function )
pop Remove next element (public member function )
swap Swap contents (public member function )

you can see documentation for more information

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.