It is creating a histogram of the characters 0-9. It subtracts '0' which"c- '0'" turns the values in 0-9value from getchar() into an integer, which acts as the index for the array reference,. This index corresponds to the numbers 0-9. It then it increments that location in the array location. Each position inThus, once it has completed running, the array corresponds to a characterconsists of the repetitions for the characters 0-9.
So 0123456789 should createresult in an array of all ones. 0123333 should createresult in an array starting with the values 11141114000000.