四川农村信用社考试吧:编写C程序---希望大家多提供点方法和技巧

来源:百度文库 编辑:中科新闻网 时间:2024/05/15 05:10:39
编写一个函数string_search(char str1[],char str2[])如果字符串str1中包含字符串str2,则返回数值1,否则返回0

int string_search(const char* str1, const char* str2)
{
if(strstr(str1, str2))
{
return 1;
}
return 0;
}