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

李帥的博客

軟件開發(fā)愛(ài)好者

  C++博客 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
  14 隨筆 :: 3 文章 :: 4 評(píng)論 :: 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 []()

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

附上我的選擇和疑問(wèn),歡迎大家指正和討論:

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) 評(píng)論(1)  編輯 收藏 引用

評(píng)論

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


只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   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>
            日韩一级不卡| 欧美xxxx在线观看| 国产精品99久久久久久www| 中文久久乱码一区二区| 日韩视频中文字幕| 亚洲男人的天堂在线| 久久av资源网| 免费亚洲婷婷| 国产精品国产三级国产专区53 | 欧美激情在线观看| 亚洲性视频网址| 美女精品一区| 国产日韩欧美91| 一本色道88久久加勒比精品| 久久久国产精彩视频美女艺术照福利| 久久全球大尺度高清视频| 亚洲少妇一区| 欧美乱大交xxxxx| 国产日韩成人精品| 亚洲综合色在线| 亚洲电影在线看| 99精品热视频只有精品10| 亚洲国产精品视频| 久久免费高清| 国产日韩欧美亚洲一区| 欧美成人精品在线| 欧美日韩国产在线看| 在线免费观看成人网| 欧美一区2区三区4区公司二百 | 亚洲最新色图| 香蕉久久夜色精品国产| 欧美三级黄美女| 99国产精品久久久久久久成人热| 亚洲亚洲精品在线观看| 亚洲精品日韩一| 亚洲承认在线| 久久综合久色欧美综合狠狠 | 你懂的视频欧美| 欧美一区二区三区四区在线观看地址| 欧美1区2区3区| 久久乐国产精品| 国产精品视频自拍| 欧美主播一区二区三区| 午夜激情久久久| 国产精一区二区三区| 欧美一区二区高清| 欧美三级网址| 亚洲人成网站精品片在线观看| 欧美精品福利视频| 中文国产成人精品久久一| 欧美 日韩 国产 一区| 久久久久久久一区二区三区| 国产精品大片wwwwww| 亚洲激情校园春色| 国产欧美日韩不卡| 亚洲色无码播放| 亚洲欧美日韩国产另类专区| 亚洲欧美日韩一区二区三区在线观看| 在线亚洲一区观看| 久久精品2019中文字幕| 亚洲国产成人在线| 亚洲激情另类| 最新国产精品拍自在线播放| 日韩一区二区精品视频| 亚洲精一区二区三区| 亚洲视频视频在线| 亚洲免费视频成人| 国产精品激情偷乱一区二区∴| 中国女人久久久| 午夜精品一区二区三区在线播放| 久久国产综合精品| 久久综合九色综合网站| 嫩草国产精品入口| 亚洲高清资源综合久久精品| 亚洲欧洲精品成人久久奇米网| 男女激情视频一区| 亚洲精品看片| 午夜视频一区| 国产自产精品| 一本大道久久a久久综合婷婷| 激情久久影院| 中文欧美日韩| 久久精品中文字幕一区| 亚洲二区在线| 欧美日韩在线亚洲一区蜜芽| 亚洲一区欧美| 在线亚洲成人| 国产色爱av资源综合区| 久久久久免费视频| 欧美主播一区二区三区美女 久久精品人| 国产精品一区二区久久久| 欧美一区二区三区在线| 亚洲女同同性videoxma| 国产一区二区三区观看 | 欧美~级网站不卡| 在线综合视频| 国产一区二区三区高清在线观看 | 欧美三级资源在线| 欧美制服丝袜第一页| 亚洲二区精品| 香蕉av777xxx色综合一区| 欧美精品在线视频| 亚洲欧美日韩国产一区二区三区| 六月婷婷久久| 黄网动漫久久久| 欧美三级不卡| 麻豆成人小视频| 亚洲一区www| 亚洲欧洲日本国产| 久久天天躁狠狠躁夜夜爽蜜月| 亚洲精品久久嫩草网站秘色| 国产亚洲午夜高清国产拍精品| 欧美国产日韩精品| 亚洲免费不卡| 免费人成精品欧美精品| 伊人成人开心激情综合网| 欧美中文在线视频| 亚洲天堂激情| 亚洲欧洲一区| 欧美国产日韩精品| 久久精品2019中文字幕| 国内精品久久久久影院优 | 亚洲欧美一区二区三区久久 | 久久精品国产精品| 亚洲综合首页| 日韩亚洲在线| 亚洲国产视频直播| 欧美激情中文字幕乱码免费| 欧美一区二区三区免费在线看| 99国产精品久久久久久久| 亚洲夫妻自拍| 欧美大胆人体视频| 99视频在线精品国自产拍免费观看| 好吊色欧美一区二区三区四区 | 国产主播一区| 国产欧美精品在线| 国产精品推荐精品| 国产精品精品视频| 国产精品久久久久9999| 欧美金8天国| 欧美1区2区视频| 免费欧美在线视频| 嫩草影视亚洲| 欧美精品乱人伦久久久久久| 免费欧美高清视频| 男人天堂欧美日韩| 欧美精品成人| 欧美性色aⅴ视频一区日韩精品| 亚洲欧美中文在线视频| 亚洲淫性视频| 欧美在线一二三| 久久精品一区二区国产| 亚洲伦理网站| 久久亚洲春色中文字幕| 久久久久一区二区三区| 久久一区二区三区av| 欧美1区免费| 亚洲国产精品久久91精品| 亚洲精品欧美激情| 亚洲视频欧洲视频| 欧美在线免费看| 久久阴道视频| 亚洲一二三区在线| 亚洲电影免费在线观看| 亚洲精品久久久久久一区二区| 日韩视频免费大全中文字幕| 亚洲图片在区色| 久久精品视频在线观看| 欧美顶级少妇做爰| 一本色道久久精品| 亚洲精品乱码久久久久久日本蜜臀 | 欧美一区成人| 欧美第十八页| 久久午夜激情| 欧美日韩免费一区二区三区视频| 欧美一区二区三区在线看| 久久综合伊人77777| 欧美精品一区二区三区很污很色的| 欧美日韩一区二区在线观看视频| 国产精品丝袜久久久久久app| 国内成+人亚洲| 在线视频欧美一区| 欧美亚洲综合在线| 欧美不卡一卡二卡免费版| 亚洲精品之草原avav久久| 欧美中文字幕视频| 欧美日本三区| 伊人夜夜躁av伊人久久| 亚洲视频香蕉人妖| 欧美xart系列高清| 中文一区字幕| 欧美高清在线视频观看不卡| 国产亚洲欧美另类中文| av成人天堂| 欧美黑人一区二区三区| 性欧美激情精品| 国产精品理论片在线观看| 亚洲免费视频网站| 欧美日韩视频专区在线播放 | 国产精品人人做人人爽人人添|