转载: 摩托罗拉部分面试题

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,多重继承如何消除向上继承的二义性。

原文地址:https://www.cnblogs.com/heyonggang/p/3209379.html