1.1 a)Apple。b)IBM Personal computer。 c)程序。d)输入单元、输出单元、内存单元、算术与逻辑单元、中央处理单元、辅助存储单元。e)机器语言、汇编语言、高级语言。 f)编译器。g)UNIX。h)Pascal。i)多任务o 1.2 a)编辑器。b)预处理器。c)连接器。d)装入器。 1.3 a)main。L)左花括号({)、右花括号(})。c)分号。d)换行。e)if。 1.4 a)不正确。程序执行时,注释语句不产生任何操作,它们只是说明程序和提高程序可读性。 b)正确。 c)正确。 d)正确。 e)不正确。C++是区别大小写的,两个变量是不同变量。 f)正确。 g)不正确 h)不正确。运算符*、/、%的优先级相同,而运算符+、-的优先级较低。 i)不正确。一个输出语句可以用cout和多个 转义序列打印多行文本。 1.5
a) intc,thisisAVariable,q76354,number; b)cout<< "Enter an integer: "; c)cin>>age; d)if(number!=7) cout<< "The variable number is not equal to 7 "; e) cout<< "This is a C++ program"; f) cout<< "This is a C++ program "; g)cout<< "This is a C++ program "; h)cout<< "This is a C++ program ";
1.6
a) // Calculatoe the product of three integers b) int x,y,z,result; c) cout<< "Enter three integers: "; d) cin>>x>>y>>z; e) result=x*y*z; f) cout<< "The product is "<< result<< endl; g) return 0;
1.7
// Calculate the product of three integers #include< iostream.h> int main() { int x,y,z,result; cout<< "Enter three integers: "; cin>>x>>y>>z; result=x*y*z; cout<< "The product is "<< result<< endl; return 0; }
1.8 a)不正确:if语句条件的右括号后面有分号。 纠正:删除右括号后面的分号。注意:这个错误的结果是不管if语句是否为真,都执行输出语句。右括号后面的分号导致空语句。下一章将介绍空语句o b)不正确:没有关系运算符=>。 纠正:将=>变为>=。 1.9 a)抽象。b)属性。c)行为。d)多重。e)消息。f)接口。g)信息隐藏。h)名词。i)数据成员、成员函数或方法。j)对象。
2015考研复试技巧http://www.kyjxy.com/fushi/zhinan/
2016考研数学资料http://www.kyjxy.com/shuxue/ziliao/
2016考研专硕复习方法http://www.kyjxy.com/zhuanshuo/