#include<stdio.h>#include<string.h>voidrevrse(char*s){char*p,c;
p=s;/*find last char because "\0"*/while(*p)p++;
p--;/*head and last change*/while(p>=s){
c=*s;*s=*p;*p=c;
s++;
p--;}}intmain(void){char*str;char a[]="apple";
str = a;printf("%s\n",str);revrse(str);printf("%s\n",str);return0;}