( 15 )下列程序的输出结果是 【 15 】 。
#include
using namespace std;
class A {
int a;
public:
A():a(9){}
virtual void print() const { cout<<a;};
};
class B : public A {
char b;
public:
B( ){b='S';}
void print( ) const { cout <<b;}
};
void show(A &x){ x.print();}
int main()
{ A d1,*p;
B d2;
p=&d2;
d1.print();
d2.print();
p->print();
show(d1);
show(d2);
return 0;}
第1题:
Python语句 print(type(1/2))的输出结果是:______
A.< class 'int'>
B.<class 'number'>
C.<class 'float'>
D.<class 'double>
第2题:
Python语句 print(type(1J))的输出结果是:________
A.< class 'complex'>
B.< class 'int'>
C.<class 'float'>
D.<class 'dict'>
第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题:
Python语句 print(type(1//2)的输出结果是:_____
A.< class 'int'>
B.< class 'number'>
C.<class 'float'>
D.<class 'double'>
第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'>
第6题:
Python 语句print(type(1J))的输出结果是:
A.<class ‘complex’>
B.<class ‘int’>
C.<class ‘float’>
D.<class ‘list’>