val[i] = val[i] + 1;
Have you ever wondered why the language used to program the Arduino is not called C = C + 1?