Post History
C (gcc), 34 bytes f(char*s){*s&&f(s+1)^putchar(*s);} Try it online! Alternative: C (gcc), 35 bytes f(s){read(0,&s,1)&&f()^putchar(s);} Try it online! Alternative ...
Answer
#3: Post edited
- # [C (gcc)], 34 bytes
- <!-- language-all: lang-c -->
- f(char*s){*s&&f(s+1)^putchar(*s);}
- [Try it online!][TIO-ki8m0nt1]
- Alternative:
- ### [C (gcc)], 35 bytes
- <!-- language-all: lang-c -->
- f(s){read(0,&s,1)&&f()^putchar(s);}
- [Try it online!][TIO-ki8mm96l]
- [TIO-ki8mm96l]: https://tio.run/##S9ZNT07@/z9No1izuig1MUXDQEetWMdQU00tTUMzrqC0JDkjsQgoaV37PzcxM09DsxooDuQkJiWnpKalAwA "C (gcc) – Try It Online"
- [C (gcc)]: https://gcc.gnu.org/
- [TIO-ki8m0nt1]: https://tio.run/##S9ZNT07@/z9NIzkjsUirWLNaq1hNLU2jWNtQM66gtAQkqgEUtq79n5uYmaehWZ2moZSYlJySmpauBBIFAA "C (gcc) – Try It Online"
- # [C (gcc)], 34 bytes
- <!-- language-all: lang-c -->
- f(char*s){*s&&f(s+1)^putchar(*s);}
- [Try it online!][TIO-ki8m0nt1]
- Alternative:
- ### [C (gcc)], 35 bytes
- <!-- language-all: lang-c -->
- f(s){read(0,&s,1)&&f()^putchar(s);}
- [Try it online!][TIO-ki8mm96l]
- Alternative #2:
- ### [C (gcc)], 36 bytes
- <!-- language-all: lang-c -->
- f(s){write(read(0,&s,1)&&f(),&s,1);}
- [Try it online!][TIO-ki8mspcy]
- [TIO-ki8mspcy]: https://tio.run/##S9ZNT07@/z9No1izurwosyRVoyg1MUXDQEetWMdQU00tTUMTwrSu/Z@bmJmnoVkNFAJyEpOSU1LT0gE "C (gcc) – Try It Online"
- [TIO-ki8mm96l]: https://tio.run/##S9ZNT07@/z9No1izuig1MUXDQEetWMdQU00tTUMzrqC0JDkjsQgoaV37PzcxM09DsxooDuQkJiWnpKalAwA "C (gcc) – Try It Online"
- [C (gcc)]: https://gcc.gnu.org/
- [TIO-ki8m0nt1]: https://tio.run/##S9ZNT07@/z9NIzkjsUirWLNaq1hNLU2jWNtQM66gtAQkqgEUtq79n5uYmaehWZ2moZSYlJySmpauBBIFAA "C (gcc) – Try It Online"
#2: Post edited
- # [C (gcc)], 34 bytes
- <!-- language-all: lang-c -->
- f(char*s){*s&&f(s+1)^putchar(*s);}
- [Try it online!][TIO-ki8m0nt1]
- [C (gcc)]: https://gcc.gnu.org/
- [TIO-ki8m0nt1]: https://tio.run/##S9ZNT07@/z9NIzkjsUirWLNaq1hNLU2jWNtQM66gtAQkqgEUtq79n5uYmaehWZ2moZSYlJySmpauBBIFAA "C (gcc) – Try It Online"
- # [C (gcc)], 34 bytes
- <!-- language-all: lang-c -->
- f(char*s){*s&&f(s+1)^putchar(*s);}
- [Try it online!][TIO-ki8m0nt1]
- Alternative:
- ### [C (gcc)], 35 bytes
- <!-- language-all: lang-c -->
- f(s){read(0,&s,1)&&f()^putchar(s);}
- [Try it online!][TIO-ki8mm96l]
- [TIO-ki8mm96l]: https://tio.run/##S9ZNT07@/z9No1izuig1MUXDQEetWMdQU00tTUMzrqC0JDkjsQgoaV37PzcxM09DsxooDuQkJiWnpKalAwA "C (gcc) – Try It Online"
- [C (gcc)]: https://gcc.gnu.org/
- [TIO-ki8m0nt1]: https://tio.run/##S9ZNT07@/z9NIzkjsUirWLNaq1hNLU2jWNtQM66gtAQkqgEUtq79n5uYmaehWZ2moZSYlJySmpauBBIFAA "C (gcc) – Try It Online"
#1: Initial revision
# [C (gcc)], 34 bytes <!-- language-all: lang-c --> f(char*s){*s&&f(s+1)^putchar(*s);} [Try it online!][TIO-ki8m0nt1] [C (gcc)]: https://gcc.gnu.org/ [TIO-ki8m0nt1]: https://tio.run/##S9ZNT07@/z9NIzkjsUirWLNaq1hNLU2jWNtQM66gtAQkqgEUtq79n5uYmaehWZ2moZSYlJySmpauBBIFAA "C (gcc) – Try It Online"