有以下程序: #include<stdio.h> main() {int s[12]={1,2,3,4,4,3,2,1,1,1,2,3},c[5]={0},i; for(i=0;i<12;i++)c[s[i]]++; for(i=1;i<5;i++)printf("%d",c[i]); printf("/n"); } 程序的运行结果是( )。
A.1 2 3 4
B.2 3 4 4
C.4 3 3 2
D.1 1 2 3
[单选题]有以下程序:includemain(){int a[]={1,2,3,4},y,*p=&a[3];££p;y=*p;printf("y=%d/n",y有以下程序: #include<stdio.h> main() { int a[]={1,2,3,4},y,*p=&a[3]; --p;y=*p;printf("y=%d/n",y); } 程序的运行结果是( )。A.y=0B.y=1C.y=2D.y=3
[单选题]有以下程序includemain(){inta[]={1,2,3,4},y,*p=&a[3];££p;y=*p;printf("y=%d/n"有以下程序 #include <stdio.h> main() { int a[]={1,2,3,4},y,*p=&a[3]; --p; y=*p;printf("y=%d/n",y); } 程序的运行结果是A.y=0B.y=1C.y=2D.y=3
[单选题]有以下程序:includemain(){inta[]={1,2,3,4},y,*p=&a[3];££p;y=*p;printf("y=%d/n有以下程序: #include<stdio.h> main() {inta[]={1,2,3,4},y,*p=&a[3]; --p;y=*p;printf("y=%d/n",y); } 程序的运行结果是( )。A.y=0B.y=1C.y=2D.y=3
[单选题]有以下程序includemain(){inta[]={1,2,3,4},y,*p=&a[3]; ££p;y=*p;printf("y=%d/n有以下程序 #include <stdio.h> main() { int a[]={1,2,3,4},y,*p=&a[3]; --p; y=*p;printf("y=%d/n",y); } 程序的运行结果是A.y=0B.y=1C.y=2D.y=3
[单选题]有以下程序 include main() {int a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a£«5,*q=N有以下程序#include <stdio.h>main( ){int a[ ]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL;*q=*(p+5);printf("%d %d/n",*p,*q);}程序运行后的输出结果是A.运行后报错B.6 6C.6 11D.5 10
[单选题]有以下程序: main() {int num[4][4]={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}},ij; for(i=0;i<4;i++) { for(j=0;j<=i;j++) printf("%4c",'); for(j=______;j<4;j++) printf("%4d",num[i][j]); printf("/n"); } } 若要按以下形式输出数组右上半三角 1 2 3 4 6 7 8 11 12 16 则在
[单选题]有以下程序: main( ) { int aa[4][4]={ {1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6} }; int i,s=0; for(i=0;i<4;i++) s+=aa[i][1]; printf("%d/n",s); } 程序运行后的输出结果是A.11B.19C.13D.20
[单选题]有以下程序main ( ){ int num[4] [4]={{1,2,3,4},{5,6,7,8}, {9,10,11,12}, {13,14,15,16}},i, j; for (i=0;i<4; i++) { for(j=1; j<=i; j++) printf ("%4c",' '); for(j=______;j<4;j++) printf ( "%4d', num [i] [j] ); printf ( "/n" ); }} 若要按下形式输出数组右上半三角 1 2 3
[单选题]有以下程序:includemain(){int a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a£«5,*q=NULL;*q有以下程序: #include <stdio.h> main() { int a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL; *q=*(p+5); printf("%d %d /n",*p,*q); } 程序运行后的输出结果是( )。A.运行后报错B.66C.611D.510
[单选题]有以下程序: main() { int aa[4][4]:{{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}}; int i,S=0; for(i=0;i<4;i++) s+=aa[i][1]; printf("%d/n",s); } 程序运行后的输出结果是( )。A.11B.19C.13D.20