[理工] 中央資工在職98年考題5

看板Grad-ProbAsk作者 (小文)時間15年前 (2011/02/09 20:19), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
5. Consider the right figure which shows a code piece. Let's assume that Object is a pre-defined C++ class. What is the correct order that the system invokes each Object's destructor? (a>obj1 obj2 obj3 obj4 ojb5 obj6 <b>obj3 obj4 obj2 obj6 obj5 obj1 <c>obj5 obj6 obj4 obj3 obj2 obj1 <d>obj5 obj6 obj2 obj4 obj3 obj1 <e>None of the above 程式片斷如下 ....... void create(void); Object obj1; int main(){ Object obj2; static Object obj3; create(); return 0; } void create(){ static Object obj4; {Object obj5;} Object obj6; } ----------------------------------------- 看了EffectiveC++後,還是不太了解,請有志之士幫忙,謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.83.170.122
文章代碼(AID): #1DKePE29 (Grad-ProbAsk)