Output of a Statement

Can you explain output of cout statement written in compare function displayed at 8:20 of video?

Hey @nemishgarg1999
This is just to show that we’re passing a function to the C++ function which calls it everytime it makes a comparison. So basically when sorting, the sort function calls compare function to compare elements.
Hope this helps. If your doubt is resolved please mark it as closed.

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.