📄 ex1.c
字号:
#include<string.h> //头文件
#include<stdio.h>
#include <reg51.h>
void main(void) //主函数
{
static char str1[]="This is a test string!"; //初始化
static char str2[15];
char *p;
//初始化串口
p=memccpy(str2,str1,'a',sizeof(str1)); //复制字符串
printf("str2=%s\n",str2); //输出结果
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -