Adding C solution for 1.1 1.2 1.3