网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下面代码的运行结果为 set1 = {1, 3, 9} set2 = {2, 4, 8, 9} set1.difference(set2)

A.{1, -2, 3, -4, 8, 0}

B.{2, 4, 8}

C.{1, 3}

D.报错


参考答案和解析
D
更多 “下面代码的运行结果为 set1 = {1, 3, 9} set2 = {2, 4, 8, 9} set1.difference(set2)A.{1, -2, 3, -4, 8, 0}B.{2, 4, 8}C.{1, 3}D.报错” 相关考题
考题 有 以下程序void f(int b[]){ int i;for(i=2;i6;i++) b[i]*=2;}main( ){ int a[10]={1,2,3,4,5,6,7,8,9,10},i;f(a);for(i=0;i10;i++) printf("%d",a[i]);}程序运行后的输出结果是A)1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ,B)1 , 2 , 6 , 8 , 10 , 12 , 7 , 8 , 9,10C)1 , 2 , 3 , 4 , 10 , 12 , 14 , 16 , 9 , 10 ,D)1 , 2 , 6 , 8 , 10 , 12 , 14 , 16 , 9 , 10 ,

考题 {0、2、1、4、3、9、5、8、6、7}是以数组形式存储的最小堆,删除堆顶元素0后的结果是()A.{2、1、4、3、9、5、8、6、7}B.{1、2、5、4、3、9、8、6、7}C.{2、3、1、4、7、9、5、8、6}D.{1、2、5、4、3、9、7、8、6}

考题 下面程序的结果为#includevoid main(){ int i;int a[3][3]={1,2,3,4,5,6,7,8,9};for(i=0;i 3;i++)cout }A.1 5 9B.7 5 3C.3 5 7D.5 9 1

考题 有以下程序:程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.10,9,8,7,6,5,4,3,2,1,C.2,3,1,6,8,7,5,4,10,9,D.10,9,8,7,6,1,2,3,4,5,

考题 当执行下面的语句定义一维数组a后,此数组的所有元素为 ( ) inta[10];A.a[1],a[2],a[3],a[4],a[5],a[6],a[8],a[9],a[10],a[10]B.a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]C.a[0],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]D.a[1],a[2],a [3],a[4],a [5],a [9],a [7],a [8],a [9],a [10],a [11]

考题 下面程序的输出结果是includemain(){int a[]={1,2,3,4,5,6,7,8,9,0},*p;p=a;printf("% 下面程序的输出结果是 #include<stdio.h> main() { int a[]={1,2,3,4,5,6,7,8,9,0},*p; p=a; printf("%d\n",*p+9);}A.0B.1C.10D.9

考题 有以下程序main() { int a[]={1,2,3,4,5,6,7,8,9,0},*p; for(p=a;pa+10;p++) printf("%d,",*p);}程序运行后的输出结果是A.1,2,3,4,5,6,7,8,9,0, B.2,3,4,5,6,7,8,9,10,1, C.0,1,2,3,4,5,6,7,8,9, D.1,1,1,1,1,1,1,1,1,1,

考题 有以下程序:程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.1,2,7,6,3,4,5,8,9,10,C.1,2,7,6,5,4,3,8,9,10,D.1,2,9,8,7,6,5,4,3,l0,

考题 有以下程序: 程序的运行结果是( )。 A.1 2 3 4B.5 6 7 8C.9 10 11 12S 有以下程序:程序的运行结果是( )。A.1 2 3 4B.5 6 7 8C.9 10 11 12D.1 1 1 1

考题 下面程序的输出结果是______。 main() { int a[]={1,2,3,4,5,6,7,8,9,0},*p; p=a; printf("%d\n",*(p+9)); }A.0B.1C.10D.9

考题 下列秸序在运行时输出的结果是( )。A. 1 3 5 7 9B. 9 7 5 3 1C. 1 2 3 4 5 6 7 8 9 10D. 10 9 8 7 6 5 4 3 2 1

考题 下面程序输出的结果是includevoid main( ){ int i;int a[3][3]={1,2,3,4,5,6,7,8,9 下面程序输出的结果是 #include<iostream.h> void main( ) { int i; int a[3][3]={1,2,3,4,5,6,7,8,9}; for(i=0;<3;i++) cout << a[2-i][i]<<" "; }A.1 5 9B.7 5 3C.3 5 7D.5 9 1

考题 有以下程序程序运行后的输出结果是( )。A.1,2,3.4,5,6,7,8,9,10,B.10,9,8,7,6,5,4,3,2,1,C.2,3,1,6,8,7,5,4,10,9,D.10,9,8,7,6,1,2,3,4,5,

考题 下面程序输出的结果是()includevoid main(){inti:int a[3][3]={1,2,3,4,5,6,7,8,9} 下面程序输出的结果是( ) #include<iostreas.h> void main() {inti: int a[3] [3]={1,2,3,4,5,6,7,8,9}; for(i=0;i<3;i++= cout<<a [i] [i]<<" ";}A.1 5 9B.7 5 3C.3 5 7D.5 9 1

考题 有下列程序:程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.1,2,7,6,3,4,5,8,9,10,C.1,2,7,6,5,4,3,8,9,10,D.1,2,9,8,7,6,5,4,3,10,

考题 有以下程序程序的运行结果是( )。A.1,2,3,4,5,6,7,8,9,0,B.2,1,4,3,6,5,8,7,0,9,SXB 有以下程序程序的运行结果是( )。A.1,2,3,4,5,6,7,8,9,0,B.2,1,4,3,6,5,8,7,0,9,C.0,9,8,7,6,5,4,3,2,l,D.0,1,2,3,4,5,6,7,8,9,

考题 下面的程序运行时,单击窗体后,窗体上显示的结果是( )。A.9 8 7 6 3 2B.2 3 6 7 8 9C.9 8 7 6 3D.2 3 6 7 8

考题 下面程序输出的结果是includevoid main(){ int i; int a[3][3]={1,2,3,4,5,6,7,8,9 下面程序输出的结果是 #include<iostream.h> void main() { int i; int a[3][3]={1,2,3,4,5,6,7,8,9}; for(i=0;<3;i++) cout<<a[2-i][i]<<" "; }A.1 5 9B.7 5 3C.3 5 7D.5 91

考题 以下程序中函数f的功能是:当na9为1时,进行由小到大排序;当na9为0时,进行由大到小排序。程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.3,4,5,6,7,2,1,8,9,10,C.5,4,3,2,1,6,7,8,9,10,D.10,9,8,7,6,5,4,3,2,1,

考题 有以下程序:程序运行后的输出结果是( )。A.2,3,1,6,8,7,5,4,10,9,B.3,4,2,7,9,8,6,5,11,10,C.2,4,3,9,12,12,11,11,18,9,D.1,2,3,6,8,7,5,4,10,9,

考题 有以下程序:程序运行后的输出结果是( )。A.2,3,1,6,8,7,5,4,10,9,B.10,9,8,7,6,5,4,3,2,l,C.1,2,3,4,5,6,7,8,9,10,D.10,9,8,7,6,1,2,3,4,5,

考题 有以下程序:include main( ){int a[ ] = { 1,2,3,4,5,6,7,8,9,0} , * p;for(p =a;p 有以下程序:#include <stdio. h>main( ){ int a[ ] = { 1,2,3,4,5,6,7,8,9,0} , * p; for(p =a;p<a+10;p++) printf("%d," , *p); }程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,0,B.2,3,4,5,6,7,8,9,10,1,C.0,1,2,3,4,5,6,7,8,9,D.1,1,1,1,1,1,1,1,1,1,

考题 下面程序运行后,输出的结果是Dim arr(3,3)For j=1 To 3For k=1 To 3Arr(j,k)=(j-1)*3+kNext kNext jFor j=2 To 3For j=2 To 3Print arr(k,j);Next kPrintNext jA.2 5 3 6B.5 8 6 9C.4 7 5 8D.5 9 6 8

考题 若有以下程序则程序的输出结果是A.1,10,3,8,5,6,7,4,9,2,B.10,9,8,7,6,5,4,3,2,1,C.10,1,8,3,6,5,4,7,2,9,D.2,9,4,7,6,5,8,3,10,l,

考题 下面程序的输出结果是 ( )public class ex2{ public static void main(String []args) { for(int cnt=1;cnt<=10;cnt++) { if(cnt<=5) continue; System.out.print(cnt+""); } }}A.1 2 3 4B.6 7 8 9C.1 2 3 4 6 7 8 9 10D.6 7 8 9 10

考题 运行上述程序后,其输出是: (A) 14 7 (B) 1 2 3 2 5 8 4 5 6 3 6 9 7 8 9 (C)9 6 1 (D)9 8 7 8 5 2 6 5 4 7 4 3 3 2 1

考题 下面程序的运行结果是()。 usingSystem; classProgram{ publicstaticvoidMain(string[]args) { constintSIZE=10; int[] y={1,2,3,4,5,6,7,8,9,10}; int[] z=newint[SIZE]; for(int i=0;i

考题 单选题阅读下列程序 INTEGER M(3,3)   DATA  M/1,2,3,4,5,6,7,8,9/    WRITE(*,10)(M(3,J),J=1,3)     10 FORMAT(1X,3I2)     END  程序运行结果是()A 2  5  8B 3  6  9C 4  5  6D 7  8  9