[c专家编程]字符查找

来源:互联网 发布:软件测试最高工资 编辑:程序博客网 时间:2024/06/05 04:14
#include <stdio.h>#include <stdlib.h>int  strfind(char **string,char scan){  char *str;  while((str = *string++) != NULL){        while(*str != '\0'){        if(*str++ == scan){                printf("str = %s\n",str);                return 1;        }        }  }  return 0;}int main(int agrc,char **argv){  char *a = "ouyangyufuhao";  char **p = &a;  strfind(p,'a');}