#include "stdio.h"
#include "string.h"
void main()
{
char str[50]="ABCDEFGHsdfwefsdf123",tmp;
int i,len;
len=strlen(str);
printf("old %s\n",str);
for(i=0;i
tmp=str[i];
str[i]=str[len-i-1];
str[len-i-1]=tmp;
}
printf("new %s\n",str);
}
#include
using namespace std;
char *Change(char *str){
for(int i=0,j=strlen(str)-1;i
str[i]+=str[j];
str[j]=str[i]-str[j];
str[i]=str[i]-str[j];
}
return str;
}
int main(){
char *pcStr = new char[15];
strcpy(pcStr, "I am yuchifang");
cout<<"before reverse:"<
cout<<"after reverse"<
while(1);
return 0;
}