( 29 )有如下程序:
#include<iostream>
using namespace std;
class Part{
public:
Part(int x=0):val(x) {cout<<val;}
~Part(){cout<<val;}
private:
int val;
};
class Whole{
public:
Whole(int x ,int y, int z=0):p2(x),p1(y),val(z){cout<<val;}
~Whole(){cout<<val;}
private:
Part p1,p2;
int val;
};
int main(){
Whole obj(1,2,3);
return 0;
}
程序的输出结果是
A ) 123321
B ) 213312
C ) 213
D ) 123123
第1题:
有如下程序: #jnClude<iostream> using namespaCe std; Class Part{ publiC: Part(int x=0):val(X){Cout<<val;} ~Part{Cout<<val;} private: int val; t }; Class Whole{ publiC: Whole(int x,int Y,int z=0):p2(x),pl(y),val(z){Cout<<val;} ~Whole{eout<<val;} private: Part pl,p2; int val; }; int main { Whole obj(1,2,3); return 0; } 执行这个程序的输出结果是( )。
A.123321
B.213312
C.213
D.123123
第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题:
Given the following DDL for the PARTS table:CREATE TABLE parts (part_no INT(9) NOT NULL, part_name VARCHAR(24), part_remain INT(9));All part numbers entered will be different and all rows should be displayed in order of increasing part numbers whenever the table is queried. Which of the following create index statements will meet this criteria and require the least amount of storage for the index object?()
A.CREATE UNIQUE INDEX idx_partno ON parts(part_no)
B.CREATE UNIQUE INDEX idx_partno ON parts(part_name ASC)
C.CREATE UNIQUE INDEX idx_partno ON parts(part_name, part_no ASC)
D.CREATE UNIQUE INDEX idx_partno ON parts(part_no, part_name ASC)
第5题: