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";
int i;
//初始化串口
i=strrpos(str,'s'); //调用函数
if(i!=-1)
printf("found the last 's' at %d\n",i); //输出结果
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?