如何在很多字符串中找到确定的字符
如果是找第二个特定字符呢。
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char a[]="Hello";
char *p=strchr(a,'l');
printf("%s
",p);
char *q=strchr(p+1,'l'); //从第p+1个字符再依次向下寻找l。
printf("%s
",q);
return 0;
}