软考初级 2021_10_05 每日一练


虚拟存储器的大小受到(11)。

A.内存容量的限制

B.作业的地址空间限制

C.外存空间及CPU地址所能表示范围的限制

D.程序大小的限制

查看答案

某显示器的分辩率为1024*768,表示像素颜色的位宽为16位,则应配置的显示存储器容量一般为(62)。

A.12MB

B.2MB

C.16Mb

D.8MB

查看答案

系统可靠性的简单度量是平均故障间隔时间(MTBF),其计算公式是(9)。MTTF:Mean Time TO Failure;MTTR:Mean Time TO Repair)

A.MTTF+MTTR

B.MTTF-MTTR

C.MTTR+MTTF

D.MTTF×MTTR

查看答案

下列编码中包含奇偶校验位、无错误,且采用偶校验的编码是(6)。

A.10101101

B.10111001

C.11100001

D.10001001

查看答案

is NOT a concept of White Box Testing.

A.You should execute all logical decisions on their tree and false sides.

B.You should execute all independent paths within a module at least once.

C.You should execute all loops at their boundary conditions.

D.You should execute all interfaces at their boundary conditions.

查看答案

电信业务经营者可根据经营状况改变资费标准。()

查看答案

Windows系统中的事件查看器将查看的事件分为 (59) 。

A.用户访问事件、安全性事件和系统事件

B.应用程序事件、安全性事件和系统事件

C.网络攻击事件、安全性事件和记帐事件

D.网络连接事件、安全性事件和服务事件

查看答案

程序设计语言的技术特性不应包括(62)。

A.数据结构的描述性

B.抽象类型的描述性

C.数据库的易操作性

D.软件的可移植性

查看答案

根据试题的描述信息分析,在最理想的情况下,需要多少天才能完成此网管软件开发任务?如果按保守的估计,则需要多少天才可完成此开发任务? (请列出简要的计算过程)

查看答案

●试题八

阅读以下说明和C++程序,将应填入(n)处的字句写在答题纸的对应栏内。

【说明】

设计一个日期类Date包括年、月、日等私有数据成员。要求实现日期的基本运算,如某日期加上天数、某日期减去天数、两日期相差的天数等。

在Date类中设计如下重载运算符函数:

Date operator+(int days):返回某日期加上天数得到的日期。

Date operator-(int days):返回某日期减去天数得到的日期。

int operator-(Date&b):返回两日期相差的天数。

【程序】

#include<iostream.h>

int day tab[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},

{31,29,31,30,31,30,31,31,30,31,30,31}};

∥day_tab二维数组存放各月天数,第一行对应非闰年,第二行对应闰年class Date

{

int year,month,day;∥年,月,日

int leap(int);∥判断是否为闰年

int dton(Date&);

Date ntod(int);

public:

Date(){}

Date(int y,int mint d){year=y;month=m;day=d;}

void setday(intd){day=d;}

void setmonth(int m){month=m;}

void setyear(int y){year=y;}

int getday(){return day;}

int getmonth(){return month:}

int getyear(){return year;)

Date operator+(int days)∥+运算符重载函数

{

static Date date;

int number= (1) ;

date=ntod(number);

return date;

}

Date operator-(int days)∥-运算符重载函数

{

staffs Date date;

int number= (2) ;

number-=days;

date=ntod(number);

return date;

}

int operator-(Date &b)∥-运算符重载函数

{

int days= (3) ;

return days;

}

void disp()

{

cout<<year<<"."<<month<<"."<<day<<endl;

}

};

int Date::leap(int year)

{if( (4) )∥是闰年

return 1;∥不是闰年

else

return0:

}

int Date::dton(Date &d)∥求从公元0年0月0日到d日期的天数

{

inty,m,days=0;

for(y=1;y<=d.year;y++)

if( (5) )days+=366;∥闰年时加366天

else days+=365;∥非闰年时加365天

for(m=0;m<d.month-1;m++)

if( (6) )

days+=day_tab[1][m];

else

days+=day_tab[0][m];

days+=D.day;

return days;

}

Date Date::ntod(intn)∥将从公元0年0月0日的天数转换成日期

{

int y=1,m=1,d,rest=n,lp;

while (1)

{if(leap(y))

if(rest<=366)break;

else rest-=366;

else∥非闰年

if(rest=365)break;

else rest-=365;

y++;

}

y--;

Ip=Ieap(y);

while (1)

{

if(Ip)∥闰年

if(rest>day_tab[1][m-1])rest-=day_tab[1][m-1];

else break;

else∥非闰年

if(rest>day_tab[0][m-1])rest-=day_tab[0][m-1];

else break;

m++;

}

d=rest;

return Date(y;m,d);

}

void main()

{

Date now(2003,10,1),then(2005,6,5);

cout<<"now:";now.disp();

cout<<"then:";then.disp();

cout<<"相差天数:"<<(then-now)<<endl;

Date dl=now+1000,d2=now-1000;

cout<<"now+1000:";d1.disp();

cout<<"now-1000:":d2.disp();

}

查看答案