Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- char sz[10001] = "sony";
- ////////////////////////////////////////////////
- void foo(char *p)
- {
- if(*p == 0) return;
- int n = strlen(p);
- printf("%c", p[n-1]);
- p[n-1] = 0;
- foo(p);
- }
- ////////////////////////////////////////////////
- int main()
- {
- scanf("%s", sz);
- foo(sz);
- }
Advertisement
Add Comment
Please, Sign In to add comment