/*****************************************************
copyright (C), 2014-2015, Lighting Studio. Co., Ltd.
File name:
Author:Jerey_Jobs Version:0.1 Date:
Description:
Funcion List:
*****************************************************/
//不使用strcpy实现字符串复制
#include <stdio.h>
void str_cpy(char* source,char* order)
{
while(*order++=*source++);
}
int main()
{
char str_source[100];
char str_order[100];
int i;
printf("please enter a string:\n");
fgets(str_source,100,stdin);
str_cpy(str_source,str_order);
printf("%s",str_order);
return 0;
}
copyright (C), 2014-2015, Lighting Studio. Co., Ltd.
File name:
Author:Jerey_Jobs Version:0.1 Date:
Description:
Funcion List:
*****************************************************/
//不使用strcpy实现字符串复制
#include <stdio.h>
void str_cpy(char* source,char* order)
{
while(*order++=*source++);
}
int main()
{
char str_source[100];
char str_order[100];
int i;
printf("please enter a string:\n");
fgets(str_source,100,stdin);
str_cpy(str_source,str_order);
printf("%s",str_order);
return 0;
}