阅读以下说明和C++抖程序,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
下面程序的功能是计算并输出某年某月的天数。
【C++程序】
include<iostream>
using namespace std;
(1) Month{Jan,Feb,Mar,Art,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec};
class Date{
public:
Date(int year,Month m_month){
(2) =year;
if (m_month<Jan‖m_month>Dec) month=Jan;
else month=m_month;
};
~Date(){};
bool IsLeapYear(){
return ((year%4==0 && year%1001!=0)‖year%400==0);
};
int CaculateDays(){
switch( (3) ){
case Feb:{
if( (4) )return29;
e1Se return 28;
}
case Jan:case Mar:case May:case Jul:case AUg:case Oct:
case Dec:retllrn 31;
case Apr:case Jun:Case Sep:case Nov:roturu30;
}
};
private:
int year;
Month month;
};
void main(){
Date day(2000,Feb);
tout<<day. (5) ();
}
第1题:
第2题:
第3题:
第4题:
()阅读下列说明和C语言程序,将应填入 (n)处的语句写在答题纸的对应栏内。[说明]下面程序是一个带参数的主函数,其功能是显示在命令行中输入的文本文件内容。[C语言函数]#include"stdio.h"main(argc,argv) int argc; char *argv[]; { (1) ; if((fp=fopen(argv[1],”r’’))== (2) ) { printf(”file not open!\n”);exit(0);} while( (3) ) putchar( (4) ); (5); }
第5题:
(a)智能网概念模型中分布功能平面模型如下图所示,请根据此图将应填入(n)处的 字句写在答题纸的对应栏内。
第6题:
试题三(共 15 分)
阅读以下说明和 C 程序,将应填入 (n) 处的字句写在答题纸的对应栏内。
第7题:
●试题二
阅读下列函数说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
该程序运行后,输出下面的数字金字塔
【程序】
include<stdio.h>
main ()
{char max,next;
int i;
for(max=′1′;max<=′9′;max++)
{for(i=1;i<=20- (1) ;++i)
printf(" ");
for(next= (2) ;next<= (3) ;next++)
printf("%c",next);
for(next= (4) ;next>= (5) ;next--)
printf("%c",next);
printf("\n");
}
}
第8题:
阅读下列程序说明和C++程序,把应填入其中(n)处的字句,写在对应栏内。
【说明】
阅读下面几段C++程序回答相应问题。
比较下面两段程序的优缺点。
①for (i=0; i<N; i++ )
{
if (condition)
//DoSomething
…
else
//DoOtherthing
…
}
②if (condition) {
for (i =0; i<N; i++ )
//DoSomething
}else {
for (i=0; i <N; i++ )
//DoOtherthing
…
}
第9题:
阅读下面的说明,回答问题1~问题4,将解答填入答题纸对应的解答栏内。
[说明]
阅读以下说明,回答问题1~问题4,将解答填入答题纸对应的解答栏内。
windows Server 2003是一个多任务多用户的操作系统,能够以集中或分布的方式实现各种应用服务器角色,是目前应用比较广的操作系统之一。
Windows内置许多应用服务功能,将下表中(1)~(5)处空缺的服务器名称填写在答题纸对应的解答栏内。
(1)