int main() { int c[4]; int ret; first_comb(6,4,c); printf("premiere combinaison: %d%d%d%d\n",c[0],c[1],c[2],c[3]); do { ret = next_comb_lex(6,4,c); printf("Next: %d%d%d%d\n",c[0],c[1],c[2],c[3]); } while(ret != 0); return 0; }