下列程序段运行的结果为 public class Test{ static void print(String s,int i){ System.out.println("String:"+s+",int:"+i); } static void print(int i, String s){ System.out.println("int:"+i+",String:"+s); } public static void main(String [] args){ print(99,"Int first"); } }
A.String:Stringfirst,int:11
B.int:11,String:Int first
C.String:String first,int:99
D.int:99,String:int first
第1题:
下面程序的运行结果为 #include<iostream.h> class A { int num; public: A(int){num=i;} A(ABm){num=a.num++;} void print(){cout<<num;} }; void main() { Aa(1),b(a); a.print(); b.print(); }
A.11
B.12
C.21
D.22
第2题:
第3题:
下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)
A.<class 'int'> <class 'float'> <class 'str'>
B.<class 'float'> <class 'int'> <class 'str'>
C.<class 'str'> <class 'float'> <class 'int'>
D.<class 'str'> <class 'int'> <class 'float'>
第4题:
3下列程序段运行的结果为( )。 public class Test{ static void print(String s,int i){ System.out.pdntlnC String: "+s+",int:"+i); } static void print(iht i,String s){ System.out.prinflnCint:"+i+",gtring:"+s); } public static void main(String[] args){ print(99,"Int first"); } }
A.String:String first,int: 11
B.int: 11,String:Int first
C.String:String first,int:99
D. int:99,Stfing:Int first
第5题:
00330038003000301585067361821下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)
A.<class 'int'> <class 'float'> <class 'str'>
B.<class 'float'> <class 'int'> <class 'str'>
C.<class 'str'> <class 'float'> <class 'int'>
D.<class 'str'> <class 'int'> <class 'float'>