Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define max_vett 50
- int strinverti (char *str){
- int i=0, dim=0, j=0, y=0;
- char str1[max_vett];
- dim=strlen(str);
- j=dim;
- while(str[i]!='\0'){
- for(y=0;y<=j;y++){
- str1[y]=str[j-1-y];
- str[y]=str1[y];
- }
- i++;
- }
- printf("L'array invertito e': %s\n",str);
- }
Add Comment
Please, Sign In to add comment