网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有类定义如下:
class Type{
public:
Type(int i=0);
Type operator-(int);
friend Type operator+(Type,Type);
private:
int val;
};
若有对象定义Type c1;则下列语句序列中,错误的是
A.Type(3)+c1;
B.c1+Type(3);
C.3-c1;
D.c1-3;
参考答案
更多 “ 有类定义如下:class Type{public:Type(int i=0);Type operator-(int);friend Type operator+(Type,Type);private:int val;};若有对象定义Type c1;则下列语句序列中,错误的是A.Type(3)+c1;B.c1+Type(3);C.3-c1;D.c1-3; ” 相关考题
考题
有如下两个列表:list1=[(2),(0),(1),(8)]list2=[(2,),(0,),(1,),(8,)]那么,type(list1[0])和type(list2[0])分别是:
Aint和tupleBint和intCtuple和tupleDtuple和int
考题
Python语句 print(type(1/2))的输出结果是:______A.< class 'int'>B.<class 'number'>C.<class 'float'>D.<class 'double>
考题
下列程序的执行结果为?x = 10 print type(x) x = 10.0 print type(x) x = '10.0' print type(x)A.<type 'int'> <type 'float'> <type 'str'>#B.<type 'int'> <type 'int'> <type 'int'>#C.<type 'str'> <type 'str'> <type 'str'>#D.程序出错
考题
Python语句 print(type(1//2)的输出结果是:_____A.< class 'int'>B.< class 'number'>C.<class 'float'>D.<class 'double'>
考题
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'>
考题
下列程序段执行结果是___________。 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'>
考题
1、下列程序的执行结果为?x = 10 print type(x) x = 10.0 print type(x) x = '10.0' print type(x)A.<type 'int'> <type 'float'> <type 'str'>#B.<type 'int'> <type 'int'> <type 'int'>#C.<type 'str'> <type 'str'> <type 'str'>#D.程序出错
热门标签
最新试卷