This -->
is not an operator at all. We have an operator like ->
, but not like -->
. It is just a wrong interpretation of while(x-- >0)
which simply means x has the post decrement operator and this loop will run till it is greater than zero.
Another simple way of writing this code would be while(x--)
. The while loop will stop whenever it gets a false condition and here there is only one case, i.e., 0
. So it will stop when the x value is decremented to zero.