Added C solution