Added solution for problem 4, in C.