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

李帥的博客

軟件開發愛好者

  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 李帥 閱讀(1379) 評論(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>
            老司机aⅴ在线精品导航| 久久不射网站| 亚洲精品国产欧美| 久久综合影视| 亚洲国产裸拍裸体视频在线观看乱了中文 | 久久av一区二区三区漫画| 亚洲午夜久久久久久久久电影院 | 亚洲一区二区少妇| 国产精品网站一区| 久久国产毛片| 久久伊伊香蕉| 日韩一级二级三级| 亚洲视频一二三| 国产一区欧美日韩| 欧美激情精品久久久久久变态| 裸体丰满少妇做受久久99精品| 亚洲清纯自拍| 亚洲一区日韩| 亚洲成色www8888| 亚洲裸体俱乐部裸体舞表演av| 欧美日韩一区二区精品| 性视频1819p久久| 美国三级日本三级久久99| 9i看片成人免费高清| 亚洲一区二区免费视频| 狠狠综合久久| 一本久久综合亚洲鲁鲁| 精品动漫一区| 在线视频精品一区| 在线成人免费观看| 9i看片成人免费高清| 国产亚洲精品成人av久久ww| 亚洲国产精品一区二区久| 欧美午夜一区二区| 欧美v亚洲v综合ⅴ国产v| 欧美深夜福利| 免费日韩成人| 国产精品嫩草久久久久| 欧美激情精品久久久久| 国产欧美精品日韩精品| 日韩午夜免费视频| 亚洲激情影院| 午夜欧美理论片| 亚洲一区视频在线| 欧美高清在线播放| 久久先锋影音| 国产一区二区中文| 亚洲视频在线播放| 亚洲精品一区二区在线| 久久久久女教师免费一区| 亚洲欧美一区二区视频| 欧美精品www在线观看| 久久亚洲视频| 国产亚洲精品久久久久久| 亚洲作爱视频| 亚洲视频一起| 欧美日韩精品免费观看视一区二区| 久久人人爽爽爽人久久久| 国产精品免费看| 亚洲精品久久久一区二区三区| 亚洲大片av| 久久久久久久久一区二区| 久久精品中文字幕免费mv| 国产精品自拍在线| 一区二区三区视频在线看| 一区二区三区黄色| 欧美精品乱码久久久久久按摩| 欧美激情精品久久久久久黑人| 伊人成人在线视频| 久久日韩精品| 免费短视频成人日韩| 影音先锋亚洲一区| 久久偷看各类wc女厕嘘嘘偷窃| 久久欧美肥婆一二区| 在线观看成人av| 久久免费视频网| 欧美韩国在线| 日韩午夜在线播放| 欧美日韩视频免费播放| 在线中文字幕一区| 欧美一区二区播放| 国产视频观看一区| 久久久国产精品亚洲一区| 久久在线视频| 亚洲国产精品黑人久久久| 欧美黄色免费| 一本色道久久综合| 久久精品视频免费| 一色屋精品亚洲香蕉网站| 欧美1级日本1级| 亚洲人精品午夜在线观看| 亚洲一区二区三区成人在线视频精品| 欧美日韩国产丝袜另类| 亚洲一区二区三区中文字幕在线 | aa成人免费视频| 欧美网站在线| 欧美在线视频免费播放| 免费成人av在线| 亚洲免费av电影| 国产精品视频第一区| 欧美在线观看一区二区三区| 欧美激情亚洲| 亚洲欧美精品一区| 亚洲高清久久久| 国产精品伦理| 麻豆精品网站| 性做久久久久久久免费看| 欧美xxxx在线观看| 亚洲自拍偷拍麻豆| 亚洲国产老妈| 国产欧美一区二区三区在线看蜜臀| 久久久天天操| 亚洲视频一二区| 午夜精品久久久久久99热| 黑人一区二区| 欧美三级电影网| 久久久久中文| 午夜一级久久| 国产精品久久久久天堂| 久久久综合精品| 亚洲天堂av图片| 亚洲黄色高清| 免费高清在线一区| 小黄鸭精品密入口导航| 亚洲品质自拍| 狠狠综合久久av一区二区小说| 国产精品国产福利国产秒拍| 久久久久久精| 久久大综合网| 亚洲欧美激情一区二区| 亚洲免费观看| 最新成人在线| 欧美电影在线观看| 久久久久久综合网天天| 亚洲综合精品四区| 夜夜嗨av色综合久久久综合网| 亚洲第一视频网站| 国产日韩在线一区| 国产精品视频不卡| 国产精品网红福利| 国产精品亚洲成人| 国产精品久久久久一区二区三区共 | 久久精品国产亚洲高清剧情介绍| 在线视频精品一区| 一本一本久久a久久精品牛牛影视| 91久久久久久久久| 91久久久国产精品| 亚洲精品久久久久久久久久久 | 久久国产日韩| 欧美一区二区三区在线免费观看| 亚洲一区图片| 欧美一区永久视频免费观看| 亚洲欧美成人| 欧美中文字幕在线观看| 午夜免费日韩视频| 欧美在线一二三| 久久婷婷激情| 欧美jjzz| 亚洲精品欧美日韩| 一本久久青青| 欧美尤物一区| 久久久免费精品| 欧美精品一区三区| 欧美体内she精视频| 国产精品视频网| 国产综合一区二区| 亚洲人成绝费网站色www| 99re热这里只有精品视频| 亚洲一区二区三区久久| 欧美一区二区三区久久精品| 久久久五月婷婷| 欧美激情区在线播放| 99精品99| 久久精品亚洲| 欧美日本高清| 国产香蕉久久精品综合网| 亚洲丶国产丶欧美一区二区三区 | 亚洲第一天堂av| 一区二区三区视频在线| 欧美在线观看一区二区三区| 久久中文精品| 99这里只有精品| 久久精品青青大伊人av| 欧美日韩国产免费| 红桃av永久久久| 这里只有精品丝袜| 久久久一本精品99久久精品66| 亚洲国产欧美日韩| 午夜精品一区二区在线观看| 麻豆国产精品va在线观看不卡| 国产精品国产三级国产普通话99| 狠狠网亚洲精品| 午夜天堂精品久久久久| 欧美1区免费| 亚洲欧美日韩精品综合在线观看 | 亚洲欧美美女| 欧美精品一区三区| 激情成人综合| 久久成人这里只有精品| 亚洲蜜桃精久久久久久久 |