multinomimial in c