Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. void reverse (char string[20])
  6. {
  7.   for(int i = strlen(string); i >= 0; i--)
  8.   {
  9.     printf("%c", string[i]);
  10.   }
  11.  
  12. }
  13.  
  14. int main()
  15. {
  16.   char string[20] = "Stephanie";
  17.   reverse(string);
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement