单项选择题

有如下程序:
void main()

int a[3][3]=1,2,3,4,5,6,i,j,s=0;
for(i=1;i<3;1++)
for(j=0;j<=i;j++)
s+=a[i][j];
printf("%d\n",s);

该程序的输出结果是( )。

A.18
B.19
C.20
D.21
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include <stdio.h> struct tt intx;struct tt *y;*p; struct tt a[4]= 20,a+1,15,a+2,30,a+3,17,a; main() int i; p=a; for(i=1; i<=2; i++) printf( %d, , p->x); p=p->y; 程序的运行结果是( )。
A.20,30,
B.30,17
C.15,30,
D.20,15,
单项选择题
有以下程序: void ss(char *s,char t) while(*s) if(*s==t)*s=t-'a'+'A'; s++: void main() char str1[100]= abcddfefdbd ,c='d'; ss(str1,c);printf( %s n ,str1); 程序运行后输出的结果是( )。
A.ABCDDEFEDBD
B.abcDDfefDbD
C.abcAAfefAbA
D.Abcddfefdbd
相关试题
  • 若有以下说明和定义语句: union uti in...
  • 有以下程序: #include <stdio.h> m...
  • 有以下程序: #include <stdio.h> m...
  • 有以下程序: void main() char s[...