Advertisement
mario_mos

t

Jul 25th, 2023
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5. #include <string.h>
  6.  
  7. /*char invtab(char arr[])
  8. {
  9. int i = strlen(arr);
  10. for(int j = 0 , j < i ; j--)
  11. {
  12. printf("%s\n",j--);
  13. }
  14.  
  15.  
  16. }*/
  17.  
  18.  
  19. char invpoint(char arr[])
  20. {
  21. char *q = arr;
  22.  
  23. //while (*q) { printf ("%c\n", *q--) ;}
  24. for (int i = 0 ; i < strlen(arr) ; i++)
  25. {
  26. printf("%c ",*q);
  27. }
  28.  
  29. }
  30.  
  31. int main()
  32. {
  33. //char *p="ceci est une chaine" ;
  34. //char *q = p;
  35.  
  36. //while (*q!=0) { printf ("%c", *q) ; q++ ;}
  37. //while (*q) { printf ("%c", *q++) ;}
  38.  
  39. //printf ("%s\n",p);
  40. //printf ("%s\n",q);
  41.  
  42. /*int x[5] = {1, 2, 4, 8, 16};
  43. int *p = &x[0];
  44. int *q = x;
  45. int *r =q;
  46.  
  47. printf("%d %d %d %d %d %d\n",x[0],*p,x[1],*(p+1),x[2],*(p+2));*/
  48.  
  49. /*char tableau[]="bonjour";
  50. tableau[0] = 'B';
  51. //printf("%s\n",tableau);
  52. char *p = &tableau[0];
  53. *p='B';
  54. printf("%s\n",p);*/
  55.  
  56. char arr[]="maman";
  57. //invtab(arr);
  58. //printf("Avec tableau : %s\n",arr);
  59.  
  60. invpoint(arr);
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. }
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement