the solution in c language

Continuing the discussion from Help me solving this: