1、平时编程过程中会遵守那些编程规范(列举你认为最重要的4~5项),举出2~3项说明规范的好处?
2、最常用的IDE是那一个?常用的功能有那些(附上快捷键)?常用的调试方法有那些?
4、TCP提供一种什么样的服务?建立需几次握手?终止需几次握手?
6、多线程同步和互斥有何异同?多线程同步和互斥有几种实现方法?
7、在Windows编程中互斥量与临界区比较类似,请分析一下二者的主要区别。
9、什么是软件工程,你最熟悉的软件开发流程是怎样的,有何优缺点?
13、重载(overload)和重写(overried,有的书也叫做“覆盖”)的区别?
15、下面代码将显示什么内容? #include <iostream>using namespace std;void other();namespace n1{ int x = 1;} namespace n2{ int x = 2;} int main(){ using namespace n1; cout << x << endl; { int x = 4; cout << x << "," << n1::x << "," << n2::x << endl; } using n2::x; cout << x << endl; other(); return 0;} void other(){ using namespace n2; cout << x << endl; { int x = 4; cout << x << "," << n1::x << "," << n2::x << endl; } using n2::x; cout << x << endl;}
16、假设String类有如下私有成员: class String{private: char *str; //points to string allocated by new int len; //holds length of string //...} a) 下述默认构造函数有什么问题? String::String(){} b) 下述构造函数有什么问题? String::String(const char *s) { str = s; len = strlen(s); } c) 下述默认构造函数有什么问题? String::String(const char *s) { strcpy(str, s); len = strlen(s); }
17、假设有下面的定义: class Frabjous{private: char fab[20];public: Frabjous(const char * s = "C++"):fab(s){} virtual void tell() {cout << fab; }};class Gloam{private: int glip; Frabjous fb;public: Gloam(int g = 0, const char *s = "C++"); Gloam(int g, const Frabjous &f); void tell();} 假设Gloam版本的tell()应显示glip和fb的值,请为这3个Gloam方法提供定义。