#? 0,1,2,,,,,,,125 ?

The return value of the #? returns status of the executed command, i.e If it is 0 then SUCCESS, If it is non-zero value the it means FAILURE.

My doubt is how does the return status defined?

1,2,3,,,,,125.

Exp: if it returns 125,, how does it relates to failure?

The return code depends on the command last run

See man page for Exit Status description of the comman you use

for example see the man page for xargs

Exit Status This command returns the following exit values:
0 All invocations of the Command parameter returned exit status 0.
1-125 A command line meeting the specified requirements could not be assembled, one or more of the invocations of the Command parameter returned a non-zero exit status, or some other error occurred.
126 Command was found but could not be invoked.
127 Command could not be found.