C-counters typically go from `0` to `< n`, because like in python an array of length `n` has indices from `0` to `n-1`. Please double-check the loops that go from `0` to `<= n`