How compare and sort algorithm working

iam not getting the working of the program

hey @shiva57reddy, compare function just take 2 values from container and swap(or arrage ) them as per the body of compare function. It is completely the internal working that how it sort the container(example array). If you want to know on which 2 elements it is working just do cout<<argument1<<argument2;