问题 选择题

1851年,领导金田起义的农民领袖是 [ ]

A.杨秀清

B.李秀成

C.洪秀全

D.萧朝桂

答案

答案:C

填空题

(41)Orientation
Yellowstone is much more than hot ground and gushing steam. Located astride the Continental Divide, most of the park occupies a high plateau surrounded by mountains and drained by several rivers. Park boundaries enclose craggy peaks, alpine lakes, deep canyons, and vast forests. In 1872, Yellowstone became the world’s first national park, the result of great foresight on the part of many people about our eventual need for the solace and beauty of wild places.
(42) When to Go
More than half of the 3 million annum visitors come in July and August. In September and early October, the weather is good, the visitors few, and the wildlife abundant. In May and June, you can see newborn animals, but the weather may be cold, wet, and even snowy. Between about No-vember 1 and May 1 most park roads are closed to vehicles.
(43) Getting There
(44) How to Visit
The 142-mile (228.5-kilometer) Grand Loop Road forms a figure eight, with connecting spurs to the five entrances. On any visit, start with the geyser basins and Mammoth Hot Springs to see wildlife and thermal features (caution: both can be hazardous if approached too closely). On the second day, travel to the Grand Canyon of the Yellowstone, Hayden Valley, and Yellowstone Lake.
(45) Park Information
Park opens year-round.
[A] Road from North Entrance to Northeast Entrance open all year; most other park roads closed to cars November through April. Call headquarters for latest weather and road conditions.
[B] Facilities for Disabled Visitor centers, Madison and Fishing Bridge Campgrounds, most rest rooms, amphitheaters, numerous ranger-led activities, walks, and exhibits are wheelchair accessible. Free brochure available.
[C] On a longer stay, visit the Northern Range, or consider a boating or fishing trip on Yellowstone Lake; a backcountry excursion on foot or horse; or any of the numerous easy nature trails throughout the park.
[D] In early years, what made Yellowstone stand out was the extravaganza of geysers and hot springs. The wild landscape and the bison, elk, and bears were nice but, after all, America was still a pioneer country filled with scenic beauty and animals.
[E] By Plane
West Yellowstone Airport (WYS) at the West Entrance of Yellowstone. (This airport is open June through September.)
Cody Airport (COD) about 50 miles (81 kilometers) from the park.
[F] During the winter season, mid-December to mid-March, Yellowstone becomes a fantasy of steam and ice; facilities are limited but sufficient. Only the road between the North and Northeast Entrances stays open to cars, but snowmobiling is permitted on unplowed roads. Heated snow coaches offer tours and give cross-country skiers access to the 50 miles (80.5 kilometers ) of groomed trails.

问答题

已知在文件IN47.DAT中存有100个产品销售记录,每个产品销售记录由产品代码dm(字符型4位)、产品名称mc(字符型10位)、单价dj(整型)、数量sl(整型)、金额je(长整型)几部分组成。其中,金额=单价x数量。函数ReadDat()的功能是读取这100个销售记录并存人数组sell中。请编制函数SortDat(),其功能要求:按金额从大到小进行排列,若金额相同,则按产品名称从小到大进行排列,最终排列结果仍存入结构数组sell中,最后调用函数WriteDat()把结果输出到文件OUT47.DAT中。
注意:部分源程序已给出。
请勿改变主函数()读函数ReaDat()和写函数WriteDat()的内容。
[试题程序]
#include<stdio.h>
#include<memory.h>
#include<string.h>
#include<stdlib.h>
#define MAX 100
typedef Struct

char dm[5];
char mc[11];
int dj;
int sl;
long je;
PRO;
PRO sell[MAX];
void ReadDat();
void WriteDat();
void SortDat()


voidmain()

memset(sell,0,sizeof(sell));
ReadDat();
SortDat();
WriteDat();

void ReadDat()

FILE*fP;
char str[80],ch[11];
int i;
fp=fopen("IN47.DAT","r");
for(i=0;i<100;i++)

fgets(str,80,fp);
memcpy(sell[i].dm,str,4);
memcpy(sell[i].mc,str+4,i0);
memcpy(ch,str+14,4);
ch[4]=0;
sell[i].dj=atoi(ch);
memcpy(ch,str+18,5);
ch[5]=0;
sell[i].sl=atoi(ch);
sell[i].je=(10ng)sell[i].dj*sell[i].sl;

fclose(fp);

void WriteDat()

FILE*fp;
int i;
fp=fopen("OUT47.DAT","w");
for(i=0;i<100;i++)

fprintf(fp,"%s %s %4d %5d%10ld\n",sell[i].dm, sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je);

fclose(fp);