软件水平考试程序员易错题(2018/9/20) |
第1题:编写一个模拟简单计算器的程序,计算表达式:a1 op a2的值,要求 a1、op、a2从盘输入。其中a1、a2(作除数时不能为0)为数值,op为运算符+、-、*、/。 |
【分析题】: |
第2题:定义一个具有10个元素的整型数组,应当使用语句( )
A、int a[10]; B、int a[2,5]; C、int a[]; D、int *a[10]; |
【单选题】: |
第3、4、5、6、7题:Aninstructionismadeupofoperationsthat__(66)__thefunctiontobeperformedandoperandsthatrepresentthedatatobeoperatedon.Forexample,ifaninstructionistoperformtheoperationof__(67)__twonumbers,itmustknow__(68)__thetwonumbersare.Theprocessor'sjobisto__(69)__instructionsandoperandsfrommemoryandtoperformeachoperation.Havingdonethat,itsignalsmemorytosendit__(70)__instruction.
66. A、skip B、smile C、smoke D、specify 67. A、adD、B、addeD、C、adding D、addition 68. A、when B、where C、which D、who 69. A、get B、make C、push D、put 70. A、ant B、last C、next D、secon |
【单选题】: |
【单选题】: |
【单选题】: |
【单选题】: |
【单选题】: |
第8题:能正确定义一个用来指向打开文件的文件型指针变量fp的语句是( )
A、file fp; B、file *fp; C、FILE、fp; D、FILE、*fp; |
【单选题】: |
第9题:设Ch是Char型变量,其值为’A’,则下面表达式的值是( )
ch=(ch>=’A’&&ch<=’Z’)?(ch+32):ch A、’A’ B、’a’ C、’Z’ D、’z’ |
【单选题】: |