说说我被面试到的c++题目吧# JobHunting - 待字闺中
h*3
1 楼
只谈c++,不谈其他,比如stl,我自个觉得属于data structure的。当然也有一些我认
为很有可能被面试到的概念题。想到哪写到哪吧。很惭愧,大家提的那3本书都没看过
。也许 C++ PRIMER看过。
1) 为啥要用c++;
2) encapsulate, polymophysim,inheritance的概念;
3)class的概念
4)default constructor是啥样的;
5) 写copy constructor要注意啥
6) 写 operator assignment的时候要注意啥
7)can constructor be virtual? why it can or can not? how about destructor.
8) what's the default functions of class
9) describe virtual table
10) what's the size of empty class
11) what's the difference of class and struct
12) what's the difference of reference & pointer
13) what's the difference of passing by reference & passing by value
14) when is the copy constructor called
15) type cast
16) template
17) deep copy & shallow copy
18) auto pointer
19) what's the differenc of new & malloc
20) what happens when new/malloc fails
21) what's the abstract class
22) what's the pure function?
23) how to print "hello world" before main()
24) inheritance 哪些能继承,哪些不能
25)class a array[50],怎么给这50个元素置初值,不能循环赋值,就是这个意思,你
可以动态分配
26)static
好像一般就是这些题;如果要白板或者笔试,我就不知道了。
为很有可能被面试到的概念题。想到哪写到哪吧。很惭愧,大家提的那3本书都没看过
。也许 C++ PRIMER看过。
1) 为啥要用c++;
2) encapsulate, polymophysim,inheritance的概念;
3)class的概念
4)default constructor是啥样的;
5) 写copy constructor要注意啥
6) 写 operator assignment的时候要注意啥
7)can constructor be virtual? why it can or can not? how about destructor.
8) what's the default functions of class
9) describe virtual table
10) what's the size of empty class
11) what's the difference of class and struct
12) what's the difference of reference & pointer
13) what's the difference of passing by reference & passing by value
14) when is the copy constructor called
15) type cast
16) template
17) deep copy & shallow copy
18) auto pointer
19) what's the differenc of new & malloc
20) what happens when new/malloc fails
21) what's the abstract class
22) what's the pure function?
23) how to print "hello world" before main()
24) inheritance 哪些能继承,哪些不能
25)class a array[50],怎么给这50个元素置初值,不能循环赋值,就是这个意思,你
可以动态分配
26)static
好像一般就是这些题;如果要白板或者笔试,我就不知道了。