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

李帥的博客

軟件開發愛好者

  C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
  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 李帥 閱讀(1372) 評論(1)  編輯 收藏 引用

評論

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


只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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| 久久视频在线免费观看| 久久久久久久网| 欧美四级剧情无删版影片| 99精品久久| 欧美在线看片| 极品av少妇一区二区| 亚洲精品视频一区二区三区| 欧美一区二区在线| 一本色道久久99精品综合| 韩日欧美一区二区三区| 国产精品亚洲欧美| 欧美电影专区| 欧美99在线视频观看| 欧美一区二区三区免费在线看 | 亚洲国产成人tv| 欧美国产精品久久| 欧美制服丝袜| 欧美一区二区三区在线看| 美女精品视频一区| 1024国产精品| 国产欧美一区二区精品忘忧草 | 亚洲精品一区二区在线| 亚洲清纯自拍| 伊人久久婷婷| 欧美日本不卡高清| 欧美亚洲一区二区在线| 老鸭窝毛片一区二区三区| 一本一本久久| 在线看一区二区| 国产精品电影在线观看| 久久国产日本精品| 一区二区三区高清| 亚洲国产欧美日韩另类综合| 亚洲在线观看视频| 亚洲视屏在线播放| 日韩视频一区二区| 一区二区三区四区五区精品| 韩国v欧美v日本v亚洲v | 国产精品人人爽人人做我的可爱| 欧美韩日高清| 欧美高清视频一二三区| 欧美大色视频| 欧美日韩亚洲国产一区| 欧美日韩亚洲系列| 国产精品国产一区二区| 国产精品夜夜夜一区二区三区尤| 欧美性色aⅴ视频一区日韩精品| 欧美日韩精品一二三区| 国产精品自在在线| 欧美午夜剧场| 亚洲精品一区二区三区福利| 欧美激情视频一区二区三区免费 | 亚洲精品小视频| 亚洲国产婷婷香蕉久久久久久| 亚洲国产精品久久久久| 在线看欧美日韩| 亚洲精品免费在线观看| 亚洲国产精品传媒在线观看| 亚洲精品自在久久| 欧美在线播放| 亚洲激情不卡| 久久精品天堂| 欧美激情按摩| 国产亚洲视频在线| 中文欧美日韩| 亚洲国产精品传媒在线观看| 99精品国产在热久久下载| 欧美伊人精品成人久久综合97| 久久男女视频| 国产精品系列在线| 亚洲一区免费| 亚洲欧洲一区二区三区在线观看 | 国产伊人精品| 最新国产成人在线观看| 久久亚洲欧洲| 新片速递亚洲合集欧美合集| 欧美精品系列| 亚洲国产精品日韩| 久久青草久久| 亚洲影院色无极综合| 欧美色欧美亚洲高清在线视频| 国产最新精品精品你懂的| 欧美一级片在线播放| 久久久免费精品视频| 亚洲性视频网址| 欧美大片免费久久精品三p| 午夜一区二区三区在线观看| 久久夜色精品国产欧美乱极品| 欧美一区永久视频免费观看| 在线国产日韩| 亚洲小说春色综合另类电影| 影音先锋亚洲视频| 亚洲在线日韩| 极品av少妇一区二区| 亚洲国产一区二区在线| 国产日本欧美一区二区| 欧美a级一区二区| 国产欧美视频在线观看| 麻豆精品一区二区av白丝在线| 欧美一区二区三区视频在线观看 | 麻豆成人在线| 亚洲欧洲一二三| 一本大道久久a久久综合婷婷| 欧美日韩综合视频| 久久久久国产精品一区三寸| 久久久久久午夜| 99re视频这里只有精品| 亚洲一区在线直播| 在线播放一区| 欧美主播一区二区三区美女 久久精品人| 国产午夜精品全部视频在线播放| 久久精品国产99国产精品| 欧美日本成人| 91久久久一线二线三线品牌| 国产裸体写真av一区二区| 亚洲国产欧美在线| 韩国三级在线一区| 亚洲一区在线视频| 中国女人久久久| 乱人伦精品视频在线观看| 欧美一区二区三区精品| 欧美aaaaaaaa牛牛影院| 久久免费视频网| 国产区在线观看成人精品| 亚洲精选一区| 亚洲乱码国产乱码精品精可以看 | 日韩午夜高潮| 欧美黄污视频| 国产一区二区三区久久 | 欧美另类综合| 亚洲激情av| 亚洲欧美日韩一区二区| 国产精品色婷婷久久58| 久久亚洲私人国产精品va| 亚洲国产aⅴ天堂久久| 亚洲综合激情| 99综合精品| 欧美激情精品久久久久久大尺度 | 欧美高清视频一区| 亚洲精品一线二线三线无人区| 欧美激情久久久久| 亚洲欧美卡通另类91av| 欧美国产综合一区二区| 日韩亚洲国产精品| 国产精品国产成人国产三级| 欧美一区二区三区免费观看| 欧美mv日韩mv国产网站app| 中文亚洲视频在线| 黄色免费成人| 国产精品欧美精品| 欧美福利一区| 久久er99精品| 一本久久a久久精品亚洲| 蜜桃av一区二区三区| 香蕉成人伊视频在线观看| 99精品黄色片免费大全| 伊人久久婷婷| 在线观看中文字幕不卡| 国产老女人精品毛片久久| 欧美日韩亚洲精品内裤| 欧美精品电影在线| 久久夜色精品国产噜噜av| 亚洲影院污污.| 亚洲私人影吧| 欧美国产日本韩| 久久久国产精品一区| 久久精品主播| 欧美国产免费| 亚洲精品极品| 亚洲一区二区三区国产| 亚洲在线电影| 欧美有码在线视频| 久久午夜精品| 久久天天狠狠| 久久伊人精品天天| 亚洲第一久久影院| 亚洲精品国产品国语在线app| 一区二区欧美视频| 亚洲一区视频| 在线日韩中文| 国外成人在线| 亚洲精美视频| 亚洲激情影院| 亚洲欧美日韩精品久久亚洲区| 亚洲网站啪啪| 欧美成人dvd在线视频| 亚洲午夜精品久久久久久app| 久久久免费av| 欧美三级电影精品| 91久久国产自产拍夜夜嗨| 一区二区三区 在线观看视频|