填空题 C语言
题号 #153043

若给fun函数的形参s传送字符串:"]]6354abcc" (其中]表示空格字符),则函数的返回值是【19】。  
#include <ctype.h> 
long fun(char s[]) 
{long n;int sign; 
for(;isspace(*s);s++); 
sign=(*s==′-′)?-1:1; 
if(*s==′+′||*s==′-′)s++; 
for(n=0;isdigit(*s);s++)n=10*n+(*s-′0′); 
return sign*n; 
}

进入在线模考

参考答案

暂无

答案解析

6354

你可能感兴趣的试题

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