中国大学MOOC: String str = “oop.163.com”; String temp[ ] = str.split(.); 执行完该语句,temp的内容为:temp[0]=oop temp[1]=163 temp[2]=com
举一反三
- String str = “oop.163.com”; String temp[ ] = str.split("."); 执行完该语句,temp的内容为:temp[0]=oop temp[1]=163 temp[2]=com A: 正确 B: 错误
- Python中的语句:temp=['a','1',2,3,None,]print(len(temp))其输出结果是_____ A: 3 B: 4 C: 5 D: 6
- 如下函数的返回值是___________def test(): temp=[1,2,3,4,5,6,7,8,9,10] return [x for x in temp if x%3==2] A: [2, 5, 8] B: [1, 3, 6] C: [3, 6, 9] D: [1, 4, 7]
- 以下程序的运行结果为( )void swap(int x[]){ int temp; temp = x[0]; x[0] = x[1]; x[1] = temp;}void main(){ int a[2]={3,5}; swap(a); printf("a[0]=%d\na[1]=%d\n",a[0],a[1]);}
- 理解下面算法,并补充完整。[br][/br] //算法功能:(1) public void insertSort() { int temp, position; for (int i = 1; i [ length; (2) ) { temp = record[i]; for (position = i; position ] 0 && temp < record[position -1]; (3) ) { record[position] = record[position - 1]; } record[position] = (4) ; } }[/i]