1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#include <stdio.h> #include <string.h> int main(void) { char temp[] = "!dlrow olleH"; char str[80], *p1, *p2; p1 = temp + strlen(temp)-1; p2 = str; while(p1>=temp) { *p2++=*p1--; } *p2 = '\0'; printf("%s", str); return 0; }
1
Hello world!