HackerRank Functions in C problem solution - TheCScience