Guest User

Untitled

a guest
May 26th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1.  
  2. #define max_vett 50
  3.  
  4. int strinverti (char *str){
  5. int i=0, dim=0, j=0, y=0;
  6. char str1[max_vett];
  7. dim=strlen(str);
  8. j=dim;
  9. while(str[i]!='\0'){
  10. for(y=0;y<=j;y++){
  11. str1[y]=str[j-1-y];
  12. str[y]=str1[y];
  13. }
  14. i++;
  15. }
  16.  
  17. printf("L'array invertito e': %s\n",str);
  18. }
Add Comment
Please, Sign In to add comment