亚洲免费人人妻人人,cao78在线视频,福建一级毛片,91精品视频免费观看,高清另类图片操逼,日本特黄特色大片免费看,超碰欧美人人澡曰曰澡夜夜泛

筆試題程序的輸出

時間:2018-12-31 12:00:00 資料大全 我要投稿

筆試題(程序的輸出)

分析一下這段程序的輸出 (Autodesk)

筆試題(程序的輸出)

class B

{

public:

B()

{

cout<<"default constructor"<<endl;

}

~B()

{

cout<<"destructed"<<endl;

}

B(int i):data(i)    //B(int) works as a converter ( int -> instance of B)

{

cout<<"constructed by parameter " << data <<endl;

}

private:

int data;

};

B Play( B b)

{

return b ;

}

(1)                                            results:

int main(int argc, char* argv[])       constructed by parameter 5

{                                     destructed B(5)形參析構

B t1 = Play(5); B t2 = Play(t1);     destructed t1形參析構

return 0;               destructed t2 注意順序!

}                                      destructed t1

(2)                                    results:

int main(int argc, char* argv[])       constructed by parameter 5

{                                     destructed B(5)形參析構

B t1 = Play(5); B t2 = Play(10);     constructed by parameter 10

return 0;               destructed B(10)形參析構

}                                     destructed t2 注意順序!

                                      destructed t1
 

【筆試題(程序的輸出)】相關文章:

1.程序類筆試題

2.筆試題(優(yōu)化程序)

3.筆試題(輸入輸出設備)

4.360筆試題目

5.360筆試題目

6.常規(guī)的C程序筆試題

7.C/C++程序員必備資料 常見筆面試題深入解析

8.筆試題(解釋程序)