Guest User

Untitled

a guest
Mar 6th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5. const int longueur = 4;
  6. const char *charset[16]={"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"};
  7.  
  8. int main(void){
  9. char *chaine = malloc((longueur+1)*sizeof(char));
  10. /*C'est ici que l'on commence a s'amuser*/
  11. int position = 0;
  12. chaine="0000";
  13. int j;
  14. while(position < longueur)
  15. {
  16. for (j=1;j<16;j++) {
  17. chaine[position] = *charset[j];
  18. printf("%s\n", chaine);
  19. };
  20. position++;
  21. };
  22. return(0);
  23. }
Add Comment
Please, Sign In to add comment