A.将1,2,3,4,5输出到屏幕
B.将0,1,2,3,4输出到屏幕
C.将0,1,2,3,4,5输出到屏幕
D.将出现运行时异常
第1题:
程序段intcount=0;char*s=”ABCD”;while(*s!=’/0’){s++;count++;}执行后count=()。
4
略
第2题:
给定如下Java代码片段,编译运行时,结果是() int [ ] a = {1,2,3,4,5}; for (int count = 0 ; count<5; count++) System.out.print(a[count++]) ;
A.运行时出现异常
B.输出:12345
C.输出:135
D.输出:24
第3题:
5、在C#中,下列代码的运行结果是()。 public class Test { static void Main(String[] args) { int[] num = new int[5]{1,3,2,0,0}; Array.Reverse(num); foreach(int i in num) { Console.Write(i); } } }
第4题:
读以下程序得到运行结果是______ #include<stdio.h> int main() { int k[30]={12,324,45,6}; int count=0,i=0; while(k[i]) { if(k[i]%2==0 || k[i]%5==0) count++; i++; } printf("%d,%dn",count,i); }
第5题:
39、给定如下Java代码片段,编译运行时,结果是() int [ ] a = {1,2,3,4,5}; for (int count = 0 ; count<5; count++) System.out.print(a[count++]) ;
A.运行时出现异常
B.输出:12345
C.输出:24
D.输出:135