• 2022-06-09
    The output of the statements: int a=3, b=4; printf("%d", (a>=b?a:aA: 3
    B: 4
    C: 0
    D: 1
  • B

    内容

    • 0

      #include int main() { int a=1,b=2,c=3,d=0; if (a==1) if (b!=2) if (c==3) d=1; else d=2; else if (c!=3) d=3; else d=4; else d=5; printf("%d\n",d); return 0; }

    • 1

      如果int a=3; int b=0;b=++a;那么结果是 A: a=3, b=3 B: a=4, b=4 C: a=4, b=3 D: a=3, b= 4

    • 2

      已定义数组:int a[3][6],则数组中第10个元素应该是 A: a[0][4] B: a[1][3] C: a[0][3] D: a[1][4]

    • 3

      已知 vec = [[1,2], [3,4]],则表达式 [[row[i] for row in vec] for i in range(len(vec[0]))]的值为______________()_________。[/i] A: [1, 2, 3, 4] B: [[1, 2, 3], 4] C: [[1, 3], [2, 4]] D: [1, 2, [3, 4]]

    • 4

      下面代码的执行结果是def change(mylist): mylist.append([1,2,3,4]) print(mylist) returnmylist = ["a","b","c"]change(mylist)print(mylist) A: ['a', 'b', 'c', [1, 2, 3, 4]]['a', 'b', 'c', [1, 2, 3, 4]] B: ['a', 'b', 'c', [1, 2, 3, 4]] C: ['a', 'b', 'c', 1, 2, 3, 4] D: ['a', 'b', 'c', 1, 2, 3, 4]['a', 'b', 'c', 1, 2, 3, 4]