Added C solution for problem 2