问题 填空题

[说明]
基于管理的需要,每本正式出版的图书都有一个ISBN号。例如,某图书的ISBN号为“978-7-5606-2348-1”。
ISBN号由13位数字组成:前三位数字代表该出版物是图书(前缀号),中间的9个数字分为三组,分别表示组号、出版者号和书名号,最后一个数字是校验码。其中,前缀号由国际EAN提供,已经采用的前缀号为978和979;组号用以区别出版者国家、地区或者语言区,其长度可为1~5位;出版者号为各出版者的代码,其长度与出版者的计划出书量直接相关;书名号代表该出版者该出版物的特定版次;校验码采用模10加权的算法计算得出。
校验码的计算方法如下:
第一步:前12位数字中的奇数位数字用l相乘,偶数位数字用3相乘(位编号从左到右依次为13到2)。
第二步:将各乘积相加,求出总和S。
第三步:将总和S除以10,得出余数R。
第四步:将10减去余数R后即为校验码V。若相减后的数值为10,则校验码为0。
例如,对于ISBN号“978-7-5606-2348-1”,其校验码为1,计算过程为:
S=9×1+7×3+8×1+7×3+5×1+6×3+0×1+6×3+2×1+3×3+4×1+8×3=139
R=139mod 10=9
V=10-9=1
函数check(char code[])用来检查保存在code中的一个ISBN号的校验码是否正确,
若正确则返回true,否则返回false。例如,ISBN号“978-7-5606-2348-1”在code中的
存储布局如表3-1所示(书号的各组成部分之间用“-”分隔):
                    

表3-1 数组code的内容示例

下标 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
字符 9 7 8 - 7 - 5 6 O 6 - 2 3 4 8 - 1 \\0

在函数check(char code[])中,先将13位ISBN号放在整型数组元素tarr[0]~tarr[12]中(如表3-2所示,对应ISBN号的位13~位1),由tarr[0]~tarr[11]计算出校验码放入变量V,再进行判断。

表3-2 数组tarr的内容示例

下标 0 l 2 3 4 5 6 7 8 9 10 11 12
字符 9 7 8 7 5 6 0 6 2 3 4 8 1
[C函数]
boo1 cheCk(char code[])

int i,k=0;
intS=0,temp=0;
int V;
int tarr[13]=0;
if (Strlen(code) <17 return falSe;
for(i=0; i<17; i++)/*将13位ISBN号存入tarr*/
if(code[i]!=’-’)
tarr[ (1) ]=code[i]-’0’;
for(i=0; (2) ; i++ );
if (i%2)
S+= (3) ;
else
S+= (4) ;

v=( (5) ==C) 0:10-s%10;
if(tart[12]==v)
return true ;
return false;


答案

参考答案:tarr[i],或*(tarr+i),或等价形式

阅读理解

This week Faith Lapidus and Doug Johnson will tell you about Chuck Berry.Chuck Berry,born on October 18,1926,is often called the father of rock and roll.He is one of the most popular and influential performers of rhythm-and-blues and rock‘n’roll music during the 1950s,1960s and 1970s.

He started singing in church when he was six years old.His interest in music stuck with him.A lot of Chuck Berry’s material is about teenage life,especially school.Chuck Berry left school when he was 17.He headed west with two friends,but they did not get far.They were arrested after they used a gun to steal a car in Kansas City,Missouri.He was set free after four years.

Chuck Berry signed his first recording contract in 1955,with the company Chess Records.Because one of his early hits,“Rock&Roll Music”,hit big in the United States then,which was greeted with enthusiastic reviews.Many other famous bands copied it again and again.

Filmmaker Taylor Hackford made a documentary called“Hail! Hail! Rock‘n’Roll”, named for a Chuck Berry song.It centered on the making of a concert to honor the musician on his 60th birthday in 1986.Guitarist Keith Richards from the Rolling Stones organized the concert.Listening to Chuck Berry songs got him interested in music.In Keith Richards’words,“I didn’t dream I could make a living at it but that’s what I wanted to do.”More than 75 artists and bands have done their own versions of Chuck Berry songs.

The Rock and Roll Hall of Fame in Cleveland,Ohio,included Chuck Berry in its first year of honors in 1986.The Hall of Fame had this to say:“While no individual can be said to have invented rock and roll,Chuck Berry comes the closest of any single figure to being the one who put all the essential pieces together.”

Thank you for your listening.Faith Lapidus and Doug Johnson were your announcers.

小题1:The underlined words“hit big”in Paragraph 3 probably mean“__________”.

A.won great Success

B.made rapid progress

C.got into big trouble

D.made a small difference小题2:Guitarist Keith Richards is mentioned in Paragraph 4 to show ___________.

A.music is a way of making a life

B.Chuck Berry influenced him a lot

C.he disliked Chuck Berry in fact

D.he is a real fan of Chuck Berry小题3:Which of the following about Chuck Berry is true?

A.Chuck Berry was the first to invent rock and roll on his own.

B.Chuck Berry was put into prison for leaving school in 1943.

C.Chuck Berry can be said to have formed rock and roll’s basic structure.

D.Chuck Berry is the most popular and influential performer.小题4:Where does this text probably come from?

A.An advertisement.

B.A science fiction.

C.A magazine.

D.A radio report.

单项选择题 A1/A2型题