void dec_to_bin(int dec, char *c) { int poids_fort; int taille_int; int flag_1 = 0; taille_int = 8 * sizeof(int); poids_fort = 1 << taille_int -1; while ( ( poids_fort > 0 ) ) { if ( ( ( dec/poids_fort ) > 0 ) ) { printf("1"); dec = dec - poids_fort; flag_1 = 1; } else { if ( flag_1 ) printtf("0"); } poids_fort = poids_fort / 2; } }