#include "stdio.h"#include void main() { char *p,a[200],b[200]; int i,m; p=a;printf("\nEnter a string:\n"); gets(a); m=strlen(a); p=p+m-1; for(i=0;i { b[i]=*p; p--; } b[i]='\0'; printf("%s",b); }
Spilt方法,具体查MSDN