#include <include.h>
char *strpbrk( char *s1, char *s2);
#include<stdio.h>
#include<string.h>
int main(void){
char* s1 = "http://see.xidian.edu.cn/cpp/u/xitong/";
char* s2 = "see";
char* p = strpbrk(s1,s2);
if(p){
printf("The result is: %s\n",p);
}else{
printf("Sorry!\n");
}
return 0;
}
The result is: see.xidian.edu.cn/cpp/u/xitong/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#pragma warning (disable:4996)
char *mystrpbrk(const char *cs,const char *ct);
int main(void)
{
char *s1="Welcome to Beijing.";
char *s2="BIT";
char *s3;
s3=mystrpbrk(s1,s2);
printf("%s\n",s3);
getch();
return 0;
}
/*FROM 百科*/
char *mystrpbrk(const char *cs,const char *ct)
{
const char *sc1,*sc2;
for (sc1=cs;*sc1!='\0';sc1++)
{
for (sc2=ct;*sc2!='\0';sc2++)
{
if (*sc1==*sc2)
{
return (char *)sc1;
}
}
}
return NULL;
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#pragma warning (disable:4996)
int main(void)
{
char *s1="Welcome to Beijing.";
char *s2="BIT";
char *p;
system("cls");
p=strpbrk(s1,s2);
if (p)
{
printf("%s\n",p);
}
else
{
printf("NOT Found\n");
}
p=strpbrk(s1,"i");
if (p)
{
printf("%s\n",p);
}
else
{
printf("NOT Found\n");
}
getch();
return 0;
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有