C golfing tips - returning 0 without return statement I'm looking for some solution in returning values in main function, I need to shorten my program more, return 0 takes too much characters of my code, I need to return 0, or my code fails. I know that in C there can be no return statement, and then program will use result of last operation - but on which operations I can 'really' shorten my code?
At the moment I found brk(0) as shortest return.

main(n){while(~scanf("%i",&amp;n))printf("%i ",n*~n/-2);brk(0);}
You don't need to do anything.
This assumption:

then program will use result of last operation

is erroneous. If there is no return statement, main returns 0. It is not dependent on whatever might be left over in registers or anything like that.
From the standard:

5.1.2.2.3 Program termination
If the return type of the main function is a type compatible with int, a return from the initial call to the main function is equivalent to calling the exit function with the value returned by the main function as its argument; reaching the } that terminates the main function returns a value of 0.  If the return type is not compatible with int, the termination status returned to the host environment is unspecified.

(emphasis mine)
Your program's main already returns zero, or something is wrong somewhere else.