#include <stdio.h>
//a查找范围 b查找目标 
int fun(char *a,char *b) { 
int n=0;
 while(*a)
 {
     if(*a==*b) n++;
     a++;
 }
 return n;
}
int main()
{
    char zf[]="我喜欢我我我我C语言",zf1[]="";
    printf("%d",fun(zf,zf1));
    getchar();
}

C语言:查找字符串出现的次数函数

 

相关文章:

  • 2021-06-19
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-11-02
  • 2021-11-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案