Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4.  
  5. void funcion(char *p)
  6. {
  7.  
  8. char v[100];
  9. int i=0;
  10. int x;
  11.  
  12. while(*p)
  13. {
  14. v[i]=*p;
  15. p++;
  16. i++;
  17. }
  18.  
  19. x=i;
  20. for(int j=0; j<=x; j++)
  21. {
  22.  
  23.  
  24. *p=v[j];
  25. p--;
  26. }
  27.  
  28. }
  29.  
  30. int main()
  31. {
  32.  
  33. char v[10]="udec";
  34. funcion(v);
  35. cout<<v;
  36. system("clear");
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement