下面代码的输出结果是a=[1,2,3] b=a[:] print(b)A.0xF0A9B.[1, 2, 3]C.[]D.[3,2,1]
下面代码的输出结果是a=[1,2,3] b=a[:] print(b)
A.0xF0A9
B.[1, 2, 3]
C.[]
D.[3,2,1]
参考答案和解析
123 123 123
相关考题:
已有变量定义和函数调用语句:int a=25;print_value(a);下面函数的正确输出结果是void print_value(int *x){printf("%d\n",++*x);}A.23B.24C.25D.26
执行下面程序后输出的正确结果是( )。 public class Test{ public static void main(String args[]){ System.out.print(100%3); System.out.print(","); System.out.print(100%0); } }A.1,1B.1,1.0C.1.0, lD.1.0,1.0
下列代码运行后输出结果是Defstr B-EPrivate Sub Command1_Click()B$="123"C="456"Print B+C$End 下列代码运行后输出结果是 Defstr B-E Private Sub Command1_Click() B$="123" C="456" Print B+C$ End SubA.123456B.123456C.123+"456"D.显示出错信
下面程序的输出结果是 ( ) char b[]="ABCD"; main() { char * chp; for ( chp=b; * chp;chp + =2 )printf("%s",chp); print{("\n"); }A.ABABCDB.ABCDABC.ABCDDD.ABCDCD
下面程序的输出结果是()。includeClass example{int a;public:example(int B.{a=b++ 下面程序的输出结果是( )。 #include<iostream.h> Class example {int a; public: example(int B.{a=b++;} void print(){a=a+1 cout<<a<<““;} void print()const{cout<<a<<““;} }; void main() {example x(3); Const example y(2); x.print();A.2 2B.4 3C.4 2D.3 2
下面程序的输出结果是 include class example {int a; public: example(int b) {a= 下面程序的输出结果是#include<iostream.h>class example{int a;public:example(int b) {a=b++;}void pnnt( ) {a=a+1;cout < < a < <" ";}void print( ) const{cout < < a < <" ";}};void main( ){example x(3) ;const example y(2) ;x.print( ) ;y.print( ) ;}A.2 2B.4 3C.4 2D.3 2
下面代码的输出结果是多少?char var[10];int test(char var[]){return sizeof(var);};A.4SXB 下面代码的输出结果是多少?char var[10];int test(char var[]){return sizeof(var);};A.4B.9C.11D.10
下面程序的输出结果是includeclass example{ int a;public: example(int b) {a=b++ 下面程序的输出结果是 #include<iostream,h> class example { int a; public: example(int b) {a=b++;} void print( ){a=a+1;cout<<a<<"";} void print( )const{cout<<a<<"";} }; void main( ) { example X(3);A.22B.43C.42D.32
下面程序的输出结果是includeclass example{ int a;public: example(int b){a=b++; 下面程序的输出结果是 #include<iostream.h> class example { int a; public: example(int b){a=b++;} void print(){a=a+1; cout<<a<<" ";} void print()const{cout<<a<<" ";} }; void main() { example x(3); const example y(2); x.print(); y.print(); }A.2 2B.4 3C.4 2D.3 2
给定以下JAVA代码,这段代码编译运行后输出的结果是( )publicclassTest{publicstaticintaMethod(inti)throwsException{try{returni/10;}catch(Exceptionex){thrownewException("exceptioninaaMothod");}finally{System.out.print("finally");}}publicstaticvoidmain(String[]args){try{aMethod(0);}catch(Exceptionex){System.out.print("exceptioninmain");}System.out.print("finished");}}A、finallyexceptioninmainfinishedB、exceptioninmainfinallyC、finallyfinishedD、finallyexceptioninmainfinished
下面程序段的输出结果是:int a = 2;System.out.print( a++);System.out.print( a);System.out.print(++a); A.333B.334C.234D.233
填空题代码print(1,2,3,sep=’:’)的执行结果为()。