📄 10.19.cpp
字号:
#include<stdio.h>
int main()
{
void copy_string(char from[],char to[]);
char a[]="I am a teacher.";
char b[]="You are a student.";
char *a=from,*b=to;
printf("string a=%s\nstring b=%s\n",a,b);
printf("copy string a to string b:\n");
copy_string(a,b);
printf("\nsring a=%s\nstring b=%s\n",a,b);
getchar();
return 0;
}
void copy_string(char from[],char to[])
{
int i=0;
while(from!='\0')
{
to[i]=from[i];
i++;
}
to[i]='\0';
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -