Implements back propagation in C.