求一个关于函数循环的问题
#include <stdio.h>char *mystrchr(char *, char );
int main(void)
{
char str[81];
char ch;
char *p;
do
{
puts("input range string:");
gets(str);
puts("input match char:");
ch = getchar();
getchar();
p = mystrchr(str, ch);
if ( p )
{
puts("Find!");
puts(p);
}
else puts("Can't find!");
puts("input any char except q to go on.");
gets(str);
}
while(*str != 'q');
puts("Quit.");
return 0;
}
char *mystrchr(char *p, char ch)
{
char *p_save = p;
if(*p == '\0') return NULL;
while(1)
{
if(*p == ch)
{
return p_save;
}
else
{
if(*++p == '\0')
return NULL;
p_save = p;
}
}
}
mystrchr函数中return就退出函数了,那函数中最后一句是什么意思