• 2022-06-07
    写出程序的运行结果#include <;stdio.h>;void main(){int array[3]={1,2};int i;for(i=0;i<;3;i++)printf("%d\t",array[i]);}[/i]
  • 120

    内容

    • 0

      下列程序的运行结果为 【8】 。 main() { int a&#91;3&#93;C4}={{1,3,5,7},{2,4,6,8},{15,17,34,12}}; printf("max value is %d\n",max value(3,4,a)); } max value(m,n,array) int m,n,array&#91;&#93;&#91;4&#93;; { int i,j,max; max=array&#91;0&#93;&#91;0&#93;; for(i=0;i<m;i++) for(i=0;i<n;j++) if(max<array[i]&#91;j&#93;)max=array[i]&#91;j&#93;; return(max); }[/i][/i]

    • 1

      #include &#91;stdio.h&#93;int main() { int a&#91;3&#93;&#91;3&#93;,i,j; for(i=0;i<3;i++) for(j=0;j<3;j++) a[i]&#91;j&#93;=3*i+j; for(i=0;i<3;i++) printf("%d ",a[i]&#91;1&#93;); return 0;}[/i][/i]

    • 2

      以下程序的输出结果是____。 #include<stdio.h> int main() { int a&#91;3&#93;&#91;3&#93;={1,2,3,4,5,6,7,8,9},sum=0,i,j; for (i=0;i<3;i++) sum=sum+a[i][i]; printf("sum=%d\n",sum); return 0; }[/i][/i]

    • 3

      【简答题】程序分析题(写出程序的运行结果) void fun(int b[]) { int i; for(i=0;i<10;i+=2) b[i]+=3; } main() { int a[10]={1,2,3,4,5,6,7,8,9,10},i; for(i=0;i<10;i++) printf("%-6d",a[i]); printf(" "); fun(a); for(i=0;i<10;i++) printf("%-6d",a[i]); printf(" "); } (20.0分)

    • 4

      【单选题】下面程序执行后的输出结果是()。#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}‍#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0; A. 10 B. 13 C. 21 D. 死循环