青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

李帥的博客

軟件開發(fā)愛好者

  C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
  14 隨筆 :: 3 文章 :: 4 評論 :: 0 Trackbacks
9. Which of the following statements provide a valid reason NOT to use RTTI for distributed (i.e. networked between different platforms) applications in C++?
A. RTTI is too slow.
B. RTTI does not have standardized run-time behavior.
C. RTTI uses too much memory.
D. RTTI's performance is unpredictable/non-deterministic.
E. RTTI frequently fails to function correctly at run-time

11. A C++ developer wants to handle a static_cast <char*>() operation for the class String shown below. Which of the following options are valid declarations that will accomplish this task?
class String {
public:
  //...
  //declaration goes here
};
A. char* operator char*();
B. operator char*();
C. char* operator();
D. String operator char*();
E. char* operator String();


16. When a Copy Constructor is not written for a class, the C++ compiler generates one. Which of the following statements correctly describe the actions of this compiler-generated Copy Constructor when invoked?
A. The compiler-generated Copy Constructor makes the object being constructed, a reference to the object passed to it as an argument.
B. The compiler-generated Copy Constructor does not do anything by default.
C. The compiler-generated Copy Constructor performs a member-wise copy of the object passed to it as an argument, into the object being constructed.
D. The compiler-generated Copy Constructor tags the object as having been Copy-Constructed by the compiler.
E. The compiler-generated Copy Constructor invokes the assignment operator of the class.

17. Which of the following must be ensured in order to implement a polymorphic function in C++?
A.        There has to be a pointer of the derived class that has implemented the polymorphic function that holds the address of the derived class object.
B.        The function must be declared as virtual in both the base class and in the derived class that overrides the function.
C.        The function must be declared as pure virtual.
D.        There has to be a base class pointer holding the address of a base or derived class object that has implemented the polymorphic function.
E.        The function must be declared as virtual in the base class.

18. Protected, or private, inheritance, as opposed to public inheritance, models which type of relationship in C++?
A.        Can-only-have-one-of
B.        Is-implemented-in-terms-of
C.        Was-a
D.        Has-a
E.        Shares-a-relationship-with

19. Which of the following statements describe correct methods of handling C++ exceptions?
A.        Once an exception is thrown, the compiler unwinds the heap, freeing any memory dynamically allocated within the block from which the exception was thrown.
B.        In a hierarchy of exception classes, the order of handling exceptions can be from the most specific class to the most general class.
C.        Catching an exception by reference is preferable to catching it by value.
D.        If an exception is caught by its address or pointer, it is the responsibility of the thrower to release the memory occupied by the exception.
E.        To write an exception handler, it is essential to know the concrete class of exception to catch.

20. Which of the following statements regarding functions' default arguments in C++ are correct?
A.        Default arguments cannot be of a user-defined type.
B.        Default arguments exist in the global heap and not on the function's stack.
C.        Default arguments cannot be of pointer type.
D.        Default arguments can never precede non-default arguments.
E.        Default arguments are not considered for generating the function's signature.

21. Which of the following classes must be instantiated so that the object can be used both for reading and writing to the same file in C++?
A.        ofstream
B.        stream
C.        ifstream
D.        fstream
E.        iostream

22.  Which of the following reasons describe why a destructor cannot throw an exception in C++?
A.        Since the object is being destroyed, it is illogical to throw an exception then.
B.        A destructor may be invoked as a result of stack unwinding while an exception is being handled.
C.        It can invoke the terminate() handler.
D.        The C++ language does not permit it; a throw statement in a destructor will be caught as an error by the compiler.
E.        A destructor in C++ cannot implement a try...catch block

24. Which of the following identify const-correctness failures in the C++ program below?
template<typename T>
class MyArray
{
public:
    MyArray();
    MyArray(MyArray& copy);
    MyArray& operator=(MyArray& copy);
    //...

};

class MyData
{
public:
    MyData(MyArray<int>& x, MyArray<int>& y);
    //...

    const MyArray<int>& x();
    const MyArray<int>& y();
};

MyArray<int> read_data(int*, char**);
void make_changes(MyData* edit);

int main(int argc, char* argv[])
{
    const MyArray<int> read_x = read_data(&argc, argv);
    const MyArray<int> read_y = read_data(&argc, argv);
     
    MyData user_data(read_x, read_y);
    MyData edit_buffer(user_data);
    make_changes(&edit_buffer);
}

A.        MyData(MyArray<int>& x, MyArray<int>& y); should be
MyData(const MyArray<int>& x, const MyArray<int>& y);

B.        MyArray(MyArray& copy); should be
MyArray(const MyArray& copy);

C.        MyArray& operator=(MyArray& copy); should be
const MyArray& operator=(const MyArray& copy);

D.        void make_changes(MyData* edit); should be
void make_changes(const MyData* edit);

E.        const MyArray& operator=(const MyArray& copy); should be
const MyArray& operator=(const MyArray& copy) const;

25. Which of the following operators must be overloaded by function objects in the Standard Template Library?
A.        operator +()
B.        operator ==()
C.        operator ++()
D.        operator ()()
E.        operator []()

======================================================

附上我的選擇和疑問,歡迎大家指正和討論:

9. AD (not quite sure)
11. A (What does this question mean?! Can anyone explain it? )
16. AC  (Is A right?! Should it be 'a CONST reference to the object passed to it as an argument')
17. E (not quite sure. Is A or D right too? )
18. A or E. I have no idea at all!!!!
19 C (Is B right too?)
20. only D?
21. DE
22. BC ?
24. only B ?
25. D
posted on 2008-11-07 21:37 李帥 閱讀(1370) 評論(1)  編輯 收藏 引用

評論

# re: 幾道C++筆試題,不定項選擇,請高手解答分析,歡迎討論。 2011-09-21 17:55 臭美街
[url=http://www.choumeijie.com/]臭美街[/url]  回復  更多評論
  

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久裸体视频| 久久国产视频网站| 欧美日韩国产在线一区| 一区二区三区偷拍| 一本色道久久综合精品竹菊| 国产精品成人一区二区艾草| 亚洲欧美在线网| 亚洲欧美www| 在线观看欧美激情| 亚洲精品视频中文字幕| 国产精品免费网站| 可以看av的网站久久看| 欧美激情一区二区三区| 亚洲欧美日韩精品久久亚洲区| 午夜精品免费在线| 亚洲高清自拍| 亚洲综合不卡| 亚洲精品乱码久久久久久| 一区二区三区日韩欧美| 黑丝一区二区三区| 日韩视频中文字幕| 激情久久久久久久| 亚洲精品日韩在线观看| 国产最新精品精品你懂的| 亚洲国产精品久久久久秋霞蜜臀 | 久久精品亚洲乱码伦伦中文| 久久久女女女女999久久| 一本久道久久综合婷婷鲸鱼| 欧美中文字幕在线播放| 中文av一区二区| 欧美在线影院在线视频| 亚洲无人区一区| 久久亚洲二区| 欧美影院午夜播放| 欧美久久久久免费| 免费国产一区二区| 国产日产欧产精品推荐色| 亚洲欧洲免费视频| 一区视频在线播放| 亚洲欧美日韩国产成人| 国产精品99久久久久久宅男| 欧美自拍偷拍午夜视频| 亚洲自啪免费| 欧美日韩国产成人在线| 免费一级欧美在线大片| 国产一区久久久| 亚洲一区二区黄色| 亚洲视频专区在线| 欧美激情日韩| 亚洲国产成人精品久久久国产成人一区| 国产精品免费一区二区三区在线观看| 亚洲人成毛片在线播放| 亚洲人成毛片在线播放| 久久漫画官网| 欧美高清在线一区二区| 一区在线视频| 久久久久国产精品一区| 久久亚洲精品欧美| 国产有码在线一区二区视频| 午夜精品久久久久久久| 性久久久久久久久久久久| 国产精品成人va在线观看| 亚洲精品在线视频| 中文精品一区二区三区 | 午夜精品av| 久久爱www久久做| 国产丝袜一区二区三区| 亚洲欧美国产一区二区三区| 欧美一区二区日韩| 国产亚洲一区精品| 久久久久久夜精品精品免费| 欧美 日韩 国产 一区| 亚洲国产成人tv| 久久偷看各类wc女厕嘘嘘偷窃| 久久午夜av| 亚洲国产综合在线看不卡| 欧美激情第三页| 一区二区三区四区精品| 欧美一二三区在线观看| 国产一区欧美| 欧美成年人视频网站欧美| 亚洲国产精品成人综合| 在线亚洲伦理| 国产在线拍偷自揄拍精品| 久久天堂国产精品| 91久久精品一区二区别| 亚洲无限av看| 国产一区二区激情| 男女视频一区二区| 一区二区三区毛片| 老牛国产精品一区的观看方式| 亚洲国产日韩一区| 欧美视频在线观看 亚洲欧| 午夜精品三级视频福利| 欧美成人精品不卡视频在线观看| 亚洲精品国产精品乱码不99 | 狠狠爱www人成狠狠爱综合网| 蜜臀va亚洲va欧美va天堂| 一本色道久久综合亚洲精品不卡 | 久久九九全国免费精品观看| 亚洲国产小视频| 国产精品久久久久一区| 久久漫画官网| 亚洲影院一区| 亚洲欧洲日本在线| 久久久噜噜噜久久| 中文在线一区| **欧美日韩vr在线| 国产精品亚洲аv天堂网| 久久综合网hezyo| 午夜精品一区二区三区在线视| 亚洲国产99精品国自产| 久久精品国产视频| 亚洲一区二区三区涩| 在线看日韩欧美| 国产欧美视频一区二区| 欧美日韩成人| 另类图片综合电影| 欧美一区二区三区免费看| 亚洲免费精彩视频| 欧美成人自拍视频| 久久婷婷久久| 久久久久一区二区| 欧美一区日本一区韩国一区| 中日韩高清电影网| 亚洲乱码一区二区| 亚洲欧洲日产国产综合网| 伊人精品成人久久综合软件| 国产日韩av在线播放| 国产精品美女999| 欧美性久久久| 欧美午夜精品理论片a级大开眼界| 欧美大片一区二区| 女人香蕉久久**毛片精品| 久久久久久久高潮| 欧美一乱一性一交一视频| 亚洲欧美国产制服动漫| 亚洲午夜一二三区视频| 国产精品99久久久久久久久| 一本色道久久综合亚洲精品不卡 | 91久久黄色| 91久久久一线二线三线品牌| 亚洲国产日韩欧美在线99 | 亚洲在线第一页| 亚洲视频网在线直播| 中国成人亚色综合网站| 亚洲免费在线| 午夜精品久久久久| 久久成年人视频| 久久综合久久综合九色| 欧美黑人国产人伦爽爽爽| 亚洲大片一区二区三区| 亚洲精品欧洲| 欧美α欧美αv大片| 女仆av观看一区| 久久亚洲国产成人| 亚洲综合色噜噜狠狠| 欧美va天堂在线| 欧美精品福利在线| 欧美视频福利| 国产一区二区剧情av在线| 揄拍成人国产精品视频| 亚洲免费高清视频| 午夜精品福利视频| 久久久99免费视频| 亚洲二区视频| 中文一区二区在线观看| 久久国产视频网| 欧美激情一区在线观看| 国产精品美女久久| 亚洲国产岛国毛片在线| 一区二区日韩欧美| 久久久久久网站| 亚洲精品小视频在线观看| 亚洲在线观看视频网站| 久久亚洲色图| 欧美午夜在线| 亚洲国产欧洲综合997久久| 午夜精品福利电影| 欧美激情第3页| 亚洲免费在线播放| 欧美激情亚洲国产| 国产亚洲观看| 中文精品一区二区三区 | 国产精品扒开腿做爽爽爽软件 | 欧美精品日韩三级| 国产伦精品一区二区三区| 91久久夜色精品国产网站| 欧美一区二区三区四区在线观看地址| 欧美成人嫩草网站| 欧美一级在线播放| 欧美色中文字幕| 91久久综合亚洲鲁鲁五月天| 欧美中文字幕第一页| 一本色道久久综合亚洲精品不卡| 久久九九热re6这里有精品| 国产精品福利在线观看| 日韩视频第一页| 欧美国产精品日韩| 欧美在线首页|