ex1.c

来自「零基础单片机C语言设计全套教程」· C语言 代码 · 共 16 行

C
16
字号
#include<string.h> 							//头文件
#include<stdio.h>
#include <reg51.h>

void	main(void)			  				//主函数
{
static char str[40]="this is str1";
char * p;

//初始化串口

p=strrchr(str,'s');							//调用函数
if(p!=NULL)
	printf("found the last 's' at %s\n",p);			//输出结果
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?