举一反三
- 有以下程序: #include <iostream> using namespace std; class Base{ public: Base(int x=0) {cout<<x;} }; class Derived : public Base{ public: Derived(int x=0) {cout<<x;} private: Base val; }; int main(){ Derived d(1); return 0; } 程序的输出结果是
- Python 语句print(type(1//2))的输出结果是: A: <class ‘int’> B: <class ‘float’> C: <class ‘list’> D: <class ‘str’>
- Python语句print(type(1/2)的输出结果是哪一项?( ) A: <class 'int'> B: <class 'number'> C: <class 'float'> D: <class 'double'>
- print(type(lambda:3))的输出结果是? <class 'float'>|<class 'NoneType'>|<class 'function'>|<class 'int'>
- Python语句print(type(['a','1',2,3]))的输出结果是哪一项? A: <class 'list'> B: <class 'disc'> C: <class tuple' > D: <class 'set'>
内容
- 0
有如下程序:class Base {public :int date ;} ;class Derived1 : public Base { };class Derived2 : protected Base { };int main(){Derived1 d1 ;Derived2 d2 ;d1. date = 0 ; //①d2.date = 0 ; //②return 0 ;}下列关于程序编译结果的描述中,正确的是()
- 1
根据下面的定义,能输出字符串"Li"的语句是()。struct person{char name[10];int age;};person stu[10]={"Zhang",18,"Li",17,"Ma",18,"Huang",18 };? cout<<;stu[1].name[0]<<endl;|cout<<;stu[2].name[0]<<endl;|cout<<;stu[1].name<<endl;|cout<<;stu[2].name<<endl;
- 2
在bootstrap中,栅格系统的标准用法( )是错误的。 A: <div class="container"><div class="row"></div></div> B: <div class="row"><div class="col-md-1"></div></div> C: <div class="row"><div class="container"></div></div> D: <div class="col-md-1"><div class="row"></div></div>
- 3
所有的代数运算,关系运算和逻辑运算,运算的优先级从高到低依次是 A: (>,>=,<,<=,==,~=)→(^,.^2,~)→(*,.*,&&)→(+,-,||) B: (>,>=,<,<=,==,~=)→(^,.^2,~)→(+,-,||)→(*,.*,&&) C: (^,.^2,~)→(*,.*,&&)→(+,-,||)→(>,>=,<,<=,==,~=) D: (^,.^2)→(~)→(*,.*)→(+,-)→(>,>=,<,<=,==,~=)→(&&)→(||)
- 4
type(1+2L*3.14)的结果是: A: <class ‘int’> B: <class ‘long’> C: <class ‘float’> D: <class ‘str’>