填空题 C语言
题号 #145039

以下函数fun的功能是返回str所指字符串中以形参c中字符开头的后续字符串的首地址,例如:str所指字符串为:Hello!,c中的字符为e,则函数返回字符串:ello!的首地址。若str所指字符串为空串或不包含c中的字符,则函数返回NULL。请填空。
char *fun(char *str,char 
C.
{ int n=0; char *p=str;
if(p!=NULL)
while(p[n]!=c&&p[n]!=′\0′)n++;
if(p[n]==′\0′) return NULL;
return(_____);
}

进入在线模考

参考答案

暂无

答案解析

p+n

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考