有以下程序#include stdio.hint fun(char s[]){ int n=0;while(*s=′9′*s=′0′) {n=10*n+*s-′0′;s++;}return(n);}main(){ char s[10]={′6′,′1′,′*′,′4′,′*′,′9′,′*′,′0′,′*′};printf("%d\n",fun(s));}程序的运行结果是A.9B.61490C.61D.5

有以下程序

#include <stdio.h>

int fun(char s[])

{ int n=0;

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

return(n);

}

main()

{ char s[10]={′6′,′1′,′*′,′4′,′*′,′9′,′*′,′0′,′*′};

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

}

程序的运行结果是

A.9

B.61490

C.61

D.5


相关考题:

有以下程序include stdio.hint fun(char s[]){ int n=0;while(*s='9'stdio.hint fun(char s[]){ int n=0;while(*s='9'*s='0') {n=10*n+*s-'0';s++;}return(n);}main(){ char s[10]={ '6', '1', '*', '4', '*', '9', '*', '0', '*'};printf("%d\n",fun(s));}程序运行的结果是A ) 9B ) 61490C ) 61D ) 5

有以下程序: include using namespace std; constxntN=5; int fun(char*s,char a,int 有以下程序:include <iostream>using namespace std;const xnt N=5;int fun(char *s,char a,int n){int j;*s=a;j=n;while(a<s[j])j--;return j;}int main(){char s[N+1];int k;

有以下程序 include int fun(char s[]) { int n=O; whil 有以下程序 #include <stdio.h> int fun(char s[]) { int n=O; while(*s<='9'*s>='0') { n=10*n+*s-'0'; s++; } return (n); } main() { char s[10]={ '6', '1', '*', '4', '*', '9', '*', '0', '*'}; printf("%d\n",fun(s)); }A.9B.61490C.61D.5

有以下程序includeintfun(chars[]){intn=0;while(*s='0'){n=10*n+* 有以下程序 #include <stdio.h> int fun(char s[]) { int n=0; while(*s<='9'*s>='0') {n=10*n+*s-'0';s++;} return(n); } main() {char s[10]={'6','1','*','4','*','9','*','0','*'}; printf("%d\n",fun(s)); } 程序的运行结果是A.9B.61490C.61D.5

有以下程序 main(int arge,char *argv[] ) int n,i=0; while(argv[1] [i] !='\0') { n-fun(); i++;} printf ( "%d\n" , n*argc); int fun ( ) { static int s=0; s+=1; return s; } 假设程序经编译、连接后生成可执行文件exam.exe,若键入以下命令 exam 123 <回车>A.6B.8C.3D.4

有以下程序 #includestdio.h int fun(char s[]) {int n=0; while(*s=9&&*s=0){n=10*n+*s-o;s++;) return(n); } main {char s[10]={6,1,*,4,*,9,*, 0,*); printf("%d",fun(s)); } 程序运行的结果是( )。A.9B.61490C.61D.5

有以下程序 include int fun(char s[ ]) { int n=0; while(*s='0 有以下程序#include <stdio.h>int fun(char s[ ]){ int n=0;while(*s<='9'*s>='0') {n=10*n+*s-'0';s++;}retum(n);}main( ){ char s[10]={'6','1','*','4','*','9','*','0','*'};printf("%d\n",fun(s));}程序的运行结果是A.9B.61490C.61D.5

有以下程序:includeint fun(char s[]){ intn=0;while(*s='0'){n=10 有以下程序: #include <stdio.h> int fun(char s[]) { int n=0; while(*s<='9'*s>='0') {n=10*n+*s-'0';s++;} return(n); } main() { char s[10]={'6','1','*','4','*','9','*','0','*'}; printf("%d\n",fun(s)); } 程序的运行结果是( )。A.9B.61490C.61D.5

有以下程序 includestdio.hintfun(chars[]){intn=0;while(*s=’9’stdio.hint fun(char s[]){int n=0;while(*s=’9’*s=’0’) { n=10*n+*s-‘0’;s++; }return(n);}main(){char s[10]={‘6’,’1’,’*’,’4’,’*’,’9’,’*’,’0’,’*’};printf(“%d\n”,fun(s));}程序的运行结果是( )。A.9B.61490C.61D.5