1.描述 返回目标字符在字符串中第一次出现的位置,没有则返回NULL 2.函数原型 char *strchr(const char *str, int c) str – 待搜索的字符串 c – 目标字符 3.示例 #include<stdio.h> #include<string.h> int main() { char s[10] = {“=B1+C1”}; if (strchr(s, '+')) { printf("加法操作"); } return 0; }