Advertisement
Guest User

sdfdsfsdfsdf

a guest
Oct 17th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <unistd.h>
  3. #include <stdbool.h>
  4. #include <string.h>
  5.  
  6. int main(int ac , char **argv){
  7.  
  8. if(ac != 2) {
  9. printf("Manque un argument\n");
  10. } else {
  11. view_arg(argv[1]);
  12. }
  13.  
  14. int longueurChaine = strlen(argv[1]);
  15. char pattern[longueurChaine];
  16.  
  17. for(int i=0;i<longueurChaine;i++){
  18. pattern[i]=argv[1][i];
  19. printf("%c\n",pattern[i]);
  20. }
  21.  
  22. return (0);
  23. }
  24.  
  25.  
  26. int view_arg(char *arg1) {
  27. printf ("ARG1 recupere : %s\n",arg1);
  28. return (0);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement