c algorithm embedded