以下程序的输出结果为:int a,b,c;a=1;b=5;c=3;if(a>b) a=b,b=c;c=a;printf(“a=%d,b=%d,c=%d”,a,b,c);
A: A.a=1,b=5,c=1
B: B.a=1,b=3,c=1
C: C.a=5,b=3,c=1
D: D.a=5,b=3,c=5
A: A.a=1,b=5,c=1
B: B.a=1,b=3,c=1
C: C.a=5,b=3,c=1
D: D.a=5,b=3,c=5
举一反三
- 假定有两个关系R与S,其内容分别为: R关系 S关系 A B C B C D 1 2 5 2 5 17 2 5 6 2 5 9 3 5 4 5 4 1 (πA,B(R))×(πC(S))的运算结果为 ______。 A.A B C 1 2 5 1 2 4 2 5 5 2 5 4 3 5 5 3 5 4 B.A B C D 1 2 5 17 1 2 5 9 3 5 4 1 C.A B C S.B S.C D 1 2 5 2 5 17 2 5 6 2 5 9 3 5 4 5 4 1 D.A B C 2 5 6
- 下面程序的输出结果是( )。L=[('b', 3), ('c', 1), ('d', 2), ('a', 5)]L.sort()print(L) A: [('b', 3), ('c', 1), ('d', 2), ('a', 5)] B: [('c', 1), ('d', 2), ('b', 3), ('a', 5)] C: [('a', 5), ('b', 3), ('c', 1), ('d', 2)] D: {('a', 5), ('b', 3), ('c', 1), ('d', 2)}
- 下面程序的输出结果是( )。L=[('b', 3), ('c', 1), ('d', 2), ('a', 5)]L.sort()print(L) A: {('a', 5), ('b', 3), ('c', 1), ('d', 2)} B: [('b', 3), ('c', 1), ('d', 2), ('a', 5)] C: [('c', 1), ('d', 2), ('b', 3), ('a', 5)] D: [('a', 5), ('b', 3), ('c', 1), ('d', 2)]
- 下列程序段的输出结果是( )int a=1,b=1,c=1;a=a+++b+++c;printf("%d",a);A:6B:5C:4D:3 A: 6 B: 5 C: 4 D: 3
- 下列语句输出结果是( )。int a=1,b=1,c=1; a=a+b+c; printf('%d',a); A: 4 B: 6 C: 5 D: 3