Updated solutions written in C