• 2021-04-14 问题

    有如下程序 main { char ch[2][5]={"6937","8254"}; int i,j;long s=0; for(i=0;i<2;i++) for(j=0;ch[i][j]>'';j++) s=10*s+ch[i][j]-'0'; printf("%ld ",s); } 该程序的输出结果是________

    有如下程序 main { char ch[2][5]={"6937","8254"}; int i,j;long s=0; for(i=0;i<2;i++) for(j=0;ch[i][j]>'';j++) s=10*s+ch[i][j]-'0'; printf("%ld ",s); } 该程序的输出结果是________

  • 2021-04-14 问题

    以下程序的输出是 ___。main() {char a[2][5]={”6937”,”8254”}; int i,j,s=0; for ( i = 0; i < 2; i++ ) for ( j = 0; a[i][j]>’0’ && a[i][j]<=’9’; j+=2 ) s=10*s+a[i][j]-’0’; printf(”s=%d\n”,s);}

    以下程序的输出是 ___。main() {char a[2][5]={”6937”,”8254”}; int i,j,s=0; for ( i = 0; i < 2; i++ ) for ( j = 0; a[i][j]>’0’ && a[i][j]<=’9’; j+=2 ) s=10*s+a[i][j]-’0’; printf(”s=%d\n”,s);}

  • 1