假如你正在设计一个图书馆书籍的管理程序,用数组num[]记录你们班级每个学生借走的书籍个数,现在每个人都在原来借书持有情况下又各自借了一本书,那么下列语句可以实现借书数据的修改吗?foreach(int n in num){n++;}
查看答案
程序解析:staticvoidMain(string[]args){strings1="AA";int d=678;strings2=s1+d;Console.WriteLine(" {0}", s2);//结果为_______________________char[]nm={'S','I','P','I','T','S'};stringNM=newstring(nm);Console.WriteLine(" {0}", NM);//结果为_______________________//方法返回字符串string[]sa={"AA","BB","CC","DD"};stringm=String.Join("-", sa);Console.WriteLine("Message: {0}", m);//结果为_______________________Console.ReadKey();}
string Str="A_B CD";Console.WriteLine("Length={0}",Str.Length);结果为______________.
程序解析:string s = "abcdefg";for (int i = 0; i < _______; i++){Console.WriteLine(s[i]);}上面横线上应该填写什么?
A. s.Length
B. string.Length
C. s.length
D. string.length
设int a,b;则执行以下语句后b的值为( )。a = 1; b = 10;do{ b-=a;a++;}while (b--<0);
A. 9
B. -2
C. -1
D. 8