second
seventh
ninth
第1题:
已知学生记录描述为 struct student { int no; char name[20]; char sex; struct { int year; int month; int day; } birth; }; struct student s;变量s中的“生日”应是“1985年4月4日”,下列对“生日”的正确赋值方式是______。
A.year=1985;month=4;day=4;
B.birth.year=1985;birth.month=4;birth.day=4;
C.s.year=1985;s.month=4;s.day=4;
D.s.birth.year=1985;s.birth.month=4;s.birth,day=4;
第2题:
What starting salary do you expect? ()
A. I'd like to start on Monday next week.
B. I expect to get a salary increase.
C. I'd like to start at ¥5,000 a month.
第3题:
有以下程序: Class Date { public: Date(int y,int m,mt d); { year=y; month=m; day=d; } Date(int y=2000) { year=y; month=10; day=1; } Date(Date &D) { year=d.year; month=d.month; day=d.day; } Void prin
A.2
B.3
C.4
D.5
第4题:
英式标准的日期写法应为()
A、day-month-year
B、mouth-day-year
C、year-month-day
D、year-day-month
第5题:
阅读下列说明,回答问题1至问题3。
【说明】
以下代码由C语言书写,能根据指定的年、月计算当月所含天数。
int GetMaxDay( int year, int month )
{
int maxday = 0;
if ( month >= 1 && month <= 12 )
{
if ( month == 2 )
{
if ( year % 4 == 0 )
{
if ( year % 100 == 0 )
{
if ( year % 400 == 0 )
maxday = 29;
else
maxday = 28;
}
else
maxday = 29;
}
else
maxday = 28;
}
else
{
if ( month == 4 || month == 6 || month == 9 || month == || )
maxday = 30;
else
maxday = 31;
}
}
return maxday; }
请画出以上代码的控制流图。
请计算上述控制流图的环路复杂度V(G)。
假设year的取值范围是1000<year<2001,请使用基本路径测试法为变量year、 month设计测试用例(写出year取值、month取值、maxday预期结果),使之满足基本路径覆盖要求。
请帮忙给出每个问题的正确答案和分析,谢谢!
第6题:
有以下程序:
class Date
{
public:
Date(int y,int m,int d);
{
year=y;
month=m
day=d;
}
Date(int y=2000)
{
year=y;
month=10;
day=1;
}
Date(Date &d)
{
year=d.year;
month=d.month;
day=d.day;
}
void print( )
{
cout<<year<<"."<<month<<"."<<day<<endl;
}
private:
int year,month,day;
};
Date fun(Date d)
{
Date temp;
temp=d;
return temp;
}
int main( )
{
Date datel(2000,1,1),date2(0,0,0);
Date date3(datel);
date2=fun(date3);
return 0;
}
程序执行时,Date类的拷贝构造函数被调用的次数是
A.2
B.3
C.4
D.5
第7题:
Xiaoyan: I`ve got my fitness programme from the gym for this month,Mary.
Mary: _____1_____class do you have tomorrow , Xiaoyan?
Xiaoyan; Tomorrow-Tuesday-I haven`t got a class. I do gym.
Mary: __2___ do you do gym with?
Xiaoyan: Nobody, I do two gym sessions on my own a week.
Mary: So, ___3____ are your classes?
Xiaoyan: This month, I do aerobics on Saturdays and Tai Chi on Mondays.
Mary: And_____4____do you do next month ?
Xiaoyan: I do three gym sessions, but I don`t do Tai Chi-the class is cancelled.
Mary: _____5____isn't there a class
Xiaoyan: The trainer is on holiday. But it starts again the month after next. So, the month after next, I do two gym sessions again and I do Tai Chi.
Mary: Well. Good luck! Enjoy yourself!
第8题:
在下面程序的横线处填上______,使程序执行后的输出结果为1/2005。
include<iostream.h>
using namespace std;
class Date
{
Public:
Date(int m=1,int y=0): month(m),year(y){}
void Print(){cout<<month<<"/"<<year<<end1;}
______operator+(const Date&d1,const Date&d2);
private:
int month, year;
};
Date operator+(const Date&d1,const Date&d2)
{
int year,month;
year=d1.year+d2.year;
month=d1.month+d2.month;
year+=(month-1)/12;
month=(month-1)%12+1;
return Date(month,year);
}
void main()
{
Date d1(3,2004),d2,d3(10);
d2=d3+d1;
d2.Print();
}
第9题:
A.date-month-year
B.year-date-month
C.month-year-date
D.date-year-month
第10题:
对话理解
听力原文:W: Since I have some spare cash in my account, I would like to open a time deposit account here. Can you give me some information please?
M: With pleasure. We have many kinds of time deposit accounts: 1 month, 3 month, 6 month and 1 year.
Q: What is the possible relationship between the two speakers?
(11)
A.Customs officer and travelers.
B.Employer and employee.
C.Business associates.
D.Bank clerk and customer.