HackerRank Pointers in C problem solution - TheCScience