Regarding passing of comparator function

I am not clear regarding the use of & while passing the function.
Is it like we are passing reference to a function or something else? Like we can pass reference to a variable but what does it imply to pass reference to a function?

Hey @vageesha by default sort function order the elements in ascending order.
but if we want to order them in some different order then comparator functions are needed .
inside comparators we write how we want to order any two entries in our container .

You can call but then it will work only for two numbers. We have array which can have so many numbers .To understand more, you can read this.
http://www.cplusplus.com/reference/algorithm/sort/

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.