8000 GitHub - huangliusong/C-Learn: C-Learn🏠C语言程序设计(第四版)+谭浩强著+高清晰版
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

huangliusong/C-Learn

Repository files navigation

C-Learn

C-Learn

用字符型指针变量作为实参

//用字符型指针变量作为实参
void test9(){
printf("\n用字符型指针变量作为实参\n");
void copy_string2(char from[],char to[]);
char a[]="I am a teacher.";
char b[]="You are a student.";
char * from=a,* to =b;
printf("stringa=%s\nstringb=%s\n",a,b);
printf("\ncopy string a to string b:\n");
copy_string2(from, to);
printf("string a=%s\nstring b=%s\n",a,b);

}


void copy_string2(char from[],char to[]){
int i=0;
while (from[i]!='\0') {
to[i]=from[i];
i++;
}
to[i]='\0';
}

preview

WechatIMG3.png

About

C-Learn🏠C语言程序设计(第四版)+谭浩强著+高清晰版

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0