早教吧 育儿知识 作业答案 考试题库 百科 知识分享

c#测试麻烦写7,1.Whichofthefollowingstatementsistrue?A.Onlywhileloopscanbenested.B.Onlyforloopscanbenested.C.Allloopscanbenested.D.Loopscannotbenested.E.Loopscan,butshouldnever,benested.6.Whichofthefollowingstatem

题目详情
c# 测试 麻烦写7,
1.Which of the following statements is true?
A.Only while loops can be nested.
B.Only for loops can be nested.
C.All loops can be nested.
D.Loops cannot be nested.
E.Loops can,but should never,be nested.
6.Which of the following statements regarding C# arrays is true?
A.The first element of an array has an index of 1.
B.The index of the last element of the array is equivalent to the length of the array.
C.The index of the last element of the array is equivalent to the length of the array plus
one.
D.In C#,an array’s size can change after it is initially declared.
E.In C#,an array can only have one dimension.
▼优质解答
答案和解析
1、选A,所有的循环都可以嵌套.
2、选B,共循环20次,x最后的值为20
3、选B,数组的声明方法.
4、选A,声明及实例化数组.
5、选C,获取有20个元素数组的最后一个元素.
6、貌似没有正确选项,个人对于D的理解有些模糊,暂选D(如果是动态数组的话,则是可以改变大小的).