这个程序看不懂 求高手解答
#include <stdio.h>#include <string.h>
char *fun(char *s, char *t)
{
char *a, *p, *r;
a=NULL;
while(*s)
{
p=s;
r=t;
while(*r)
if(*r==*p)
{
r++;
p++;
}
else
break;
if(*r=='\0')
a=s;
s++;
}
return(a);
}
void main()
{
char s[20], t[20], *p;
printf("please input string s:");
scanf("%s", s);
printf("please enter string t:");
scanf("%s", t);
p=fun(s, t);
if(p)
printf("the result is %s", p);
else
printf("not found!");
getch();
}