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

李帥的博客

軟件開發愛好者

  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 李帥 閱讀(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夜色资源网| 国产深夜精品福利| 亚洲高清免费视频| 久久99伊人| 欧美在线1区| 午夜日韩电影| 久久av一区| 久久岛国电影| 欧美黄色一区| 亚洲高清在线观看| 亚洲高清久久网| 亚洲乱码国产乱码精品精天堂| 亚洲精品免费看| 在线亚洲免费| 亚洲欧美日韩国产综合精品二区 | 亚洲精品少妇| 久久精品国产亚洲aⅴ| 性色一区二区三区| 欧美一区二区三区婷婷月色| 久久国产精品免费一区| 麻豆91精品91久久久的内涵| 蜜月aⅴ免费一区二区三区| 女仆av观看一区| 国产精品成人观看视频国产奇米| 国产私拍一区| 日韩视频在线免费观看| 亚洲欧美日韩区 | 国产精品国产成人国产三级| 国产三级欧美三级| 91久久国产综合久久蜜月精品| 亚洲美女视频在线免费观看| 亚洲尤物在线视频观看| 免费亚洲婷婷| 亚洲一二三区在线| 另类欧美日韩国产在线| 国产精品国产自产拍高清av| 在线观看国产精品淫| 亚洲天堂免费观看| 玖玖精品视频| 一区二区三区www| 老**午夜毛片一区二区三区| 国产精品二区三区四区| 雨宫琴音一区二区在线| 亚洲一区二区三区四区五区午夜| 久久免费精品视频| 亚洲欧美日韩成人| 欧美日韩福利视频| 在线精品福利| 久久九九精品99国产精品| av不卡免费看| 免费在线成人av| 国产一区在线看| 亚洲女性裸体视频| 亚洲精品自在在线观看| 久久人人爽人人| 国产精品一区二区欧美| 亚洲视频一区二区在线观看| 亚洲国产精品一区在线观看不卡 | 欧美aa在线视频| 小黄鸭精品aⅴ导航网站入口| 欧美激情aⅴ一区二区三区| 亚洲国产欧美日韩| 嫩草影视亚洲| 久久精品国产欧美激情| 国产主播一区| 欧美 日韩 国产精品免费观看| 久久精品一区蜜桃臀影院| 精品av久久707| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美在线视频不卡| 国产专区精品视频| 美女尤物久久精品| 久久久久国产精品厨房| 午夜精品免费视频| 国产亚洲网站| 美女露胸一区二区三区| 久久这里有精品15一区二区三区| 经典三级久久| 欧美成人精品影院| 欧美精品 日韩| 亚洲午夜精品久久久久久app| 在线视频亚洲一区| 国产日韩欧美二区| 免费久久99精品国产自在现线| 久久这里有精品15一区二区三区 | 亚洲欧美久久久久一区二区三区| 一本久道久久综合婷婷鲸鱼| 国产乱码精品一区二区三区忘忧草| 久久狠狠一本精品综合网| 欧美一区二区在线免费观看 | 国产精品久久久久9999吃药| 欧美一区二区成人| 亚洲欧美国产高清| 黄色成人在线观看| 牛牛国产精品| 美国成人直播| 亚洲视频图片小说| 亚洲专区一区| 国产日韩一区二区三区在线播放| 久久岛国电影| 韩国精品一区二区三区| 亚洲国产高潮在线观看| 欧美激情一区二区三区| 在线一区二区日韩| 久久婷婷国产综合尤物精品| 国产日产亚洲精品| 亚洲欧洲中文日韩久久av乱码| 美女黄毛**国产精品啪啪| 亚洲无线观看| 亚洲精品中文在线| 欧美在线欧美在线| 1769国内精品视频在线播放| 亚洲国产另类精品专区| 国产一区二区精品在线观看| 久久精品国产精品亚洲精品| 欧美日韩一区二区视频在线| 亚洲综合日韩在线| 亚洲自拍16p| 尤物九九久久国产精品的特点| 日韩视频一区二区三区在线播放免费观看 | 亚洲国产影院| 欧美另类videos死尸| 久久伊人亚洲| 性欧美超级视频| 欧美视频精品一区| 亚洲国产成人精品视频| 欧美日韩系列| 亚洲欧洲日本国产| 国产精品日本精品| 一区二区电影免费观看| 久久av一区二区三区| 国产精品美女| 一区二区三区高清| 国产主播喷水一区二区| 久久国产精品99久久久久久老狼| 国内精品一区二区三区| 久久精品国产久精国产一老狼 | 影音先锋亚洲一区| 国产伦精品免费视频| 99精品欧美一区二区三区| 日韩特黄影片| 久久精品国产第一区二区三区最新章节 | 久久视频在线免费观看| 欧美xx69| 亚洲精品久久久久久久久久久久久| 一区二区三区在线观看欧美 | 一区二区在线看| 久久久久网站| 狠狠色狠狠色综合日日tαg| 久久九九精品99国产精品| 午夜精品视频在线观看| 久久综合久久美利坚合众国| 亚洲国产另类久久精品| 国产欧美日韩精品专区| 亚洲欧美日韩中文视频| 国产一区二区三区丝袜| 久久先锋资源| 亚洲精品国产精品国自产在线| 国产欧美一区二区精品婷婷| 欧美一级在线视频| 亚洲欧美大片| 黄色成人av在线| 久久这里有精品15一区二区三区| 在线观看欧美日韩国产| 欧美大片国产精品| 久久亚洲综合网| 亚洲精选在线| 欧美中文在线观看| 亚洲大片在线| 欧美体内she精视频在线观看| 亚洲激情社区| 亚洲精品国产视频| 老巨人导航500精品| 久久夜色精品国产噜噜av| 国产日韩欧美中文在线播放| 亚洲小说欧美另类社区| 亚洲男人的天堂在线aⅴ视频| 欧美精品少妇一区二区三区| 男女视频一区二区| 亚洲欧美一级二级三级| 尤物yw午夜国产精品视频明星| 久久不射网站| 99国产精品99久久久久久| 亚洲视频视频在线| 亚洲精品免费在线播放| 国产麻豆9l精品三级站| 午夜精品一区二区三区在线视| 亚洲综合99| 国产精品视频成人| 亚洲国产精品精华液2区45| 欧美视频你懂的| 欧美激情在线| 欧美一区二区在线观看| 欧美激情偷拍| 久久九九99| 亚洲一区二区三区中文字幕在线| 午夜视频一区在线观看| 一本色道久久综合亚洲精品不卡 | 99热在这里有精品免费| 亚洲激情电影在线|