有以下程序: #include<stdio.h> main( ) { char a[5][10]={"one","tw0","three","four","five"}; int i,j; char t: 、 for(i=0;i<4;i++) for(j=i+1;j<5;j++) if(a[i][O]>a[j][0]) {t=a[i][O];a[i][O]=a[j][O];a[j][O]=t;) puts(a[1]); } 程序运行后的输出结果是( )。
A.fwo
B.fix
C.two
D.owo
第1题:
下列语句能给数组赋值,而不使用for循环的是
A.myArray{[1]="One";[2]="Two";[3]="Three";}
B.String s[5]=new String[] {"Zero","One","Two","Three","Four"};
C.String s[]=new String[] {"Zero","One","Two","Three","Four"};
D.String s[]=new String[]= {"Zero","One","Two","Three","Four"};
第2题:
有以下程序
main()
{char *s[]={"one","two","three"},*p;
p=s[1];
printf("%c,%s\n",*(p+1),s[0]);
}
执行后输出结果是
A.n,two
B.t,one
C.w,one
D.O,two
第3题:
下列给字符串二维数组进行赋值的语句中,错误的是()。
A.String s[ ] [ ] = new String [ ] [ ] { { “One “ , “ Two “ }, { “ Three “ , “ Four “ } } ;
B.String s[ ] [ ] = { { “ One “ , “Two “},{ “ Three “ , “ Four “ } } ;
C.String s[ ] [ ] = new String [ ] [ ] { { “Zero”} , { “ One ” , “Two” , “ Three” , “ Four” } } ;
D.String s[ 2] [2 ] = { { “ One ” , “Two”},{“ Three” , “ Four” } } ;
第4题:
有以下程序: main() { char *S[]={"one","two","three"},*p; p=s[1]; printf("%c,%s\n", *(p+1), s[0]); } 执行后输出结果是( )。
A.n,two
B.t,one
C.w,one
D.o,two
第5题:
以下对枚举类型名的定义中正确的是( )。
A.enum a={one,two,three};
B.enum a{one=9,two=-1.three=200};
C.enum a={"one","two","four"};
D.enum a{"nine","two","three"};