题目内容

以下程序的输出结果是_____________________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]={'1','3','4','*','2','9','*','0','*'}; printf("%d\n",fun(s)); return 0;}

查看答案
更多问题

以下程序的输出结果是#include void select(char *s){int i,j;char *t;t = s;for(i = 0,j=0;*(t+i)!='\0';i++)if(*(t+i)>='0'&&*(t+i)<='9'){*(s+j)=*(t+i);j++;}*(s+j) = '\0';}int main(){char str[] = "china 1949.10";select(str);printf("%s",str);return 0;}

以下程序在win32平台下的运行结果是#include int fun(int a[],int n){int i,r = 1;for(i = 0;i<=n;i++)r = r*a[i];printf("%d ",sizeof(a));return r;}int main(){int x,a[5] = {4,3,2,1,0};x = fun(a,3);printf("%d",x);return 0;}

以下程序的输出结果为_________void f(int a,int *b){int t;t=a;a=*b;*b=t;}int main(){int x=2,y=3;f(x,&y);printf("%d%d\n",x,y);return 0;}

#include void change(int *aa,int bb) { *aa=*aa*2+1; bb=bb+3;} int main(){ int a=6,b=5; change(&a,b); printf("%d %d\n",a,b); return 0;}以上程序的运行结果是( )

答案查题题库