现在的位置: 首页 > 综合 > 正文

strstr

2014年10月30日 ⁄ 综合 ⁄ 共 212字 ⁄ 字号 评论关闭

#include<stdio.h>
#include <string.h>
int main()
{
    char ch[1000],ch1[1110];
    char *p;
    while(gets(ch))
    {
        gets(ch1);
        p = strstr(ch,ch1);

        if(p != NULL)
        printf("YES\n");
        else
            printf("NO\n");

    }
    return 0;
}

抱歉!评论已关闭.