请教函数返回指针问题
#include<stdio.h>char * scan_blank(char *);
int main(void)
{
char p[]="hello world!";
char *f;
f=scan_blank(p);
puts(p);
*f='\0';
puts(p);
return 0;
}
char * scan_blank(char *ptr)
{
while(*ptr!=' '||*ptr!='\0')
ptr++;
return ptr;
}