dllbridge

Untitled

Sep 27th, 2025
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1.  
  2. #include    <stdio.h>
  3. #include   <string.h>
  4.  
  5. char sz[10001] = "sony";
  6.  
  7.  
  8. ////////////////////////////////////////////////
  9. void foo(char *p)
  10. {
  11.    
  12.     if(*p == 0) return;
  13.    
  14.     int n = strlen(p);
  15.    
  16.     printf("%c", p[n-1]);
  17.    
  18.     p[n-1] = 0;
  19.    
  20.     foo(p);
  21.    
  22. }
  23.  
  24.  
  25. ////////////////////////////////////////////////
  26. int main()
  27. {
  28.    
  29.     scanf("%s", sz);
  30.     foo(sz);
  31.    
  32.    
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment