void fun (char *s, char *t, char *u)
{ int i, j, sl, tl;
sl = slen(s); tl = slen(t);
for (i=0; i { for (j=0; j if (s[i] == t[j]) break;
/************found************/
if (j>=tl)
*u = s[i];
}
/************found************/
*u = '0';
}
main()
{ char s[100], t[100], u[100];
clrscr();
printf("\nPlease enter sing s:"); scanf("%s", s);
printf("\nPlease enter sing t:"); scanf("%s", t);
fun(s, t, u);
printf("The result is: %s\n", u);
}
===========================================
所需数据 :
===========================================
#2
@1 001004
if(jif(!(j>=tl))
if(tl>j)
if(!(tl<=j))
@2 001006
*u='\0';
*u=0;
(*u)='\0';
(*u)=0;
u[0]='\0';
u[0]=0;