/*
huziaa@gmail.com
zhejiang university
netmedian lab
*/
#include <stdio.h>
int main()
{
char str[]="hello world***";
char str1[100];
int i=0;
int j=0;
printf(" the source string is :%s/n",str);
//测试字符串长度;
while(str[i])
{
i++;
}
printf(" the string length is %d ",i);
//按照源字符串倒序复制字符,并且按照目标字符串顺序拷贝字符,实现反转
while(i>0)
{
i--;
str1[i]=str[j];
j++;
}
//字符串结束标志
str1[j+1]='/0';
printf("%d letter is copyed/n",j);
//输出
printf(" the destation string is:/n %s/n",str1);
return 0 ;
}