-->
当前位置:首页 > 题库

单选题:以下程序的输出结果是( )。

Luz5年前 (2021-05-10)题库1920
以下程序的输出结果是( )。

```
int fun(char s[ ])
{
int n = 0;

while ( *s <= '9' && *s >= '0'){
n = 10 * n + *s - '0';
s++;
}

return(n);
}

int main( )
{
char s[10]={'6', '1', '*' , '4', '*', '9', '*', '0', '*'};

printf("%d\n", fun(s));

return 0;
}
```
@[C](1)

A. 9
B. 61490
C. 61
D. 5



A.9
B.61490
C.61
D.5


答案:C