HackerRank 1D Arrays in C problem solution - TheCScience