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

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

下列程序的运行结果为( )。 #include<iostream.h> template<class TT> class FF {TT al,a2,a3; public: FF(TT bl,TT b2,TT b3){al=bl;a2=b2;a3=b3;} TT Sum{return al+a2+a3;}; } void main { FF<int>x(int(1.1),2,3),Y(int(4.2),5,6); cout<<x.Sum<<<<Y.Sum<<endl; }

A.6.1 15.2

B.6 15

C.6 15.2

D.6.1 15


参考答案

更多 “ 下列程序的运行结果为( )。 #includeiostream.h templateclass TT class FF {TT al,a2,a3; public: FF(TT bl,TT b2,TT b3){al=bl;a2=b2;a3=b3;} TT Sum{return al+a2+a3;}; } void main { FFintx(int(1.1),2,3),Y(int(4.2),5,6); coutx.SumY.Sumendl; }A.6.1 15.2B.6 15C.6 15.2D.6.1 15 ” 相关考题
考题 下列程序的运行结果是【 】。 include class SomeClass { public: SomeClass(int va 下列程序的运行结果是【 】。include <iostream. h>class SomeClass{public:SomeClass(int value) { some_value=value;};void show_data(void) { cout<<data<<"<<~some_value<<endl; };static void set_data(int value) {data=value; }private:static int data;int some_value};int SomeClass::datavoid main(void){SomeClass my_class(1001),your_class(2002);your_class. set_data(4004);my_elass. show_data()}

考题 Python语句 print(type(1/2))的输出结果是:______A.< class 'int'>B.<class 'number'>C.<class 'float'>D.<class 'double>

考题 Python语句 print(type(1//2)的输出结果是:_____A.< class 'int'>B.< class 'number'>C.<class 'float'>D.<class 'double'>

考题 Python语句 print(type([1,2,3,4]))的运行结果是A.< class 'tuple'>B.<class 'dict'>C.< class ,'set'>D.<class,'list'>

考题 现有代码t = ('a'),在Python3解释器中查看type(t)的结果为()A.<class 'str'>B.<class 'tuple'>C.(class 'str')D.(class 'tuple')

考题 运行语句print(type([1, 2, 3, 4]))输出的结果是()A.<class 'tuple'>B.<class 'dict'>C.<class 'set' >D.< class 'list' >

考题 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'>

考题 Python语句pint(type([]))的输出结果是()A.< class 'tuple‘>B.<class'dict'>C.< class 'set>D.<class 'list'>

考题 下列程序段执行结果是___________。 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'>

考题 8、如下代码的运行结果是__________。str1='abcd' print(type(str1[0]))A.<class 'char'>B.<class 'int'>C.<class 'float'>D.<class 'str'>