1.What is achieved by prefixing the 'static' keyword to a file-level function or file-level variable declaration?
2.Describe the difference between the “IS A” and “HAS A” object relationships. Which is the stronger relationship and why?
3.Java & C# support interfaces directly with the “interface” keyword.
C++ does not have an “interface” keyword.
How do you create an interface in C++?
Where/when is the use of interfaces especially helpful?
4.If a program requires a large number of execution contexts what can be done to minimise thread scheduling overhead?
5. What does it mean to say that a function is reentrant?
What are some of the ways of achieving re-entrancy?
摩托羅拉部分面試題
1.介紹一下STL,詳細說明STL如何實作vector。
2.如果用VC開發程式,常見這麼幾個錯誤,C2001,c2005,c2011,這些錯誤的原因是什麼。
3.繼承和委派有什麼分别,在決定使用繼承或者委派的時候需要考慮什麼。
4.指針和引用有什麼分别;如果傳引用比傳指針安全,為什麼?如果我使用常量指針難道不行嗎?
5.參數傳遞有幾種方式;實作多态參數傳遞采用什麼方式,如果沒有使用某種方式原因是什麼;
6.結合一個項目說明你怎樣應用設計模式的理念。
7.介紹一下你對設計模式的了解。(這個過程中有很多很細節的問題随機問的)
8.C++和C定義結構的分别是什麼。
9.構造函數可否是虛汗數,為什麼?析構函數呢,可否是純虛的呢?
10,拷貝構造函數相關問題,深拷貝,淺拷貝,臨時對象等。
11.結合1個你認為比較能展現OOP思想的項目,用UML來描述。(最好這個項目繼承,多态,虛函數都有展現)這個問題大概會占面試時間的一半,并且會問很多問題,一不小心可能會被問住)。
12。基類的有1個虛函數,子類還需要申明為virtual嗎?為什麼。
13.C也可以通過精心封裝某些函數功能實作重用,那C++的類有什麼優點嗎,難道僅僅是為實作重用。
14.C++特點是什麼,如何實作多态?畫出基類和子類在記憶體中的互相關系。
15.為什麼要引入抽象基類和純虛函數?
16.介紹一下模闆和包容器。如何實作?(也許會讓你當場舉例實作)
17.你如何了解MVC。簡單舉例來說明其應用。
18,多重繼承如何消除向上繼承的二義性。
本文轉自夏雪冬日部落格園部落格,原文連結:http://www.cnblogs.com/heyonggang/p/3209379.html,如需轉載請自行聯系原作者