How output are coming out 6054854654

would you provide me better explanation of output format?

You have to arrange 54 546 548 60 such that on appending each of the numbers it forms a maximum possible number. So clearly the greatest possible number formed is 6054854654.
For this problem you can treat the array’s elements as strings and sort them in lexicographically decreasing order. For eg. [54, 546, 548, 60] if you sort these in lexicographically decreasing order result will be [60, 548, 546, 54] , then you can print all the elements and it will form the biggest number.
So take input in the form of string. Make your own custom comparator and sort accordingly.
The custom compare function must be something like this:
bool mycompare(string a,string b)
{
string ab=a+b;
string ba=b+a;
return ab>ba;
}

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.