问题 多项选择题

fclose(out);

答案

参考答案:void jsSort()
{
int il j ,data;
for (i=0; i<AII; i++) /*对数组中的D位数按后C位进行从大到小的排序*/
for(j=i+l; j<B00; j++)
{
if (aa[i] %lOOO<aa [j ] %A000) /*比较每个数的后C位*/
{data=aa[i] ;aa[i]=aa[j]; aa [j] =data; }
else if(aa[i]%A000==aa[j]%A000) /*若后C位数相等*/
if(aa[i]>aa[j]) /*则要按原D位数的值进行从小到大的排序*/
{data=aa[i];aa[i]=aa[j];aa[j]=data; )
}
for(i=0; i<AO; i++) /*将排序后的前A0个数存入数组b中*/
bb[i]=aa[i];
}

解析: 本题实质上考的是对数组元素进行排序的问题。最容易理解的方法是选择法。选择法的基本思想是:依次用当前取得的元素和它后面的其他元素进行比较,比如要从大到小进行排序,则只要发现后面的元素中有比当前元素大的,就把刚发现的较大的元素与当前元素交换,这样做的目的是当与其后的所有元素都比较完后,可以保证当前位置的当前元素存放着最大数。按照同样的方法去取得次大数。由于本题中题目要求要对数组中的4位数的后3位进行排序,因此,要首先取得各个数的后3位并做比较,“aa[i]%1000”就可以得到每个数的后3位。根据题意,对这些数按后3位进行从大到小的排序。若后3位数相等,则要按原4位数的值进行从小到大的排序。

阅读理解
阅读理解。
                                                           Beijing Library
To Susan Chan,
Just to remind you that you have 4 overdue books.
Title                                                              Author 
      Rose Meets Mr. Winter Garden          Bob Graham            due          22/1
      My Friend Whale                              Simon James           due          23/1
      Edward the Emu                               Sheena Knowles      due          24/1 
      Imagine                                            Alison Lester          due           25/1
Please return the books tomorrow. Other people may be waiting to borrow them. 
              Librarian Mrs. Josie Jones                   Date 3/2/2005
Note: You may not borrow any new books until these books have been returned.
1. This note was sent to _______.
[ ]
A. the librarian
B. Josie Jones
C. Alison Lester
D. Susan Chan
2. The book Imagine was written by _______.
[ ]
A. Alison Lester
B. Bob Graham
C. Simon James
D. Sheena Knowles
3. On what date was My Friend Whale due to be returned to the library?
[ ]
A. 22nd, January.
B. 23rd, January.
C. 24th, January.
D. 25th, February.
4. This note could be described as a _______.
[ ]
A. report card
B. news letter
C. reminder letter
D. set of instruction
5. From the note we can know that _______.
[ ]
A. Susan does not like reading
B. the library has many books to lend
C. someone else has borrowed these books
D. Susan may not borrow any new books at the moment
填空题