//包含文件:string.h
//函数名: strstr
//函数原型:extern char *strstr(char *str1, char *str2);
//功能:从字符串str1中查找是否有字符串str2,如果有,从str1中的str2位置起,返回str1中str2起始位置的指针,如果没有,返回null。
//返回值:返回该位置的指针,如找不到,返回空指针。
#include<iostream>
#include<string.h>
#include<stdio.h>
#include<ctype.h>
#include<algorithm>
#include<stack>
#include<queue>
#include<set>
#include<math.h>
#include<vector>8
#include<map>
#include<deque>
#include<list>
using namespace std;
int main()
{
char a[999];
char b[999];
while(scanf("%s%s",a,b)!=EOF)
{
char* c=strstr(a,b);
if(c==NULL)
cout<<"isnull!"<<endl;
else
cout<<c<<endl;
}
return 0;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)