Added C version of alg06