____________________ (请随时与我联系) if you need any further information.
Elvis Aaron Presley was born in a (36) house in Tupelo, Mississippi on January 8, 1935. His twin brother, Jessie Garon, died at birth. This left Elvis to grow up as an only child. He and his parents moved to Memphis, Tennessee in 1948. Elvis (37) from Humes High School in Memphis in 1953. Elvis’ musical (38) were pop and country music, gospel music and the black (39) and blues he heard on (40) Beale Street in Memphis. In 1954, he began his singing career at the famous Sun Studio in Memphis. By 1956, he was an international sensation. His sound (41) different musical styles and (42) the social and racial (43) of the time. He began a new era of American music and popular culture. (44) , and performed many live concerts on tour and Las Vegas. Globally, he has sold over one billion records, more than any other artist. (45) . Even though his stardom might have given him special privileges, he served his country in the U.S. Army. His talent, good looks, charm, and good humor endeared him to millions of people. (46) . Elvis died at his Memphis home, on August 16, 1977.
In developing the design, ___________________________ (这位工程师必须运用工程学的知识).
已知文件IN21.DAT中存有100个产品销售记录,每个产品销售记录由产品代码dm(字符型4位)、产品名称mc(字符型10位)、单价dj(整型)、数量s1(整型)、金额je(长整型)几部分组成。其中:金额 =单价×数量。函数ReadDat()的功能是读取这100个销售记录并存入结构数组sell中。请编制函数SortDat(),其功能要求:按产品名称从大到小进行排列,若产品名称相同,则按金额从小到大进行排列,最终排列结果仍存入结构数组sell中,最后调用函数WriteDat()把结果输出到文件OUT21.DAT中。 注意:部分源程序已给出。 请勿改动主函数main()、读函数ReadDat()和写函数WriteDat()的内容。 试题程序: #include 〈stdio.h> #include 〈mem.h> #include 〈string.h> #include 〈conio. h> #include 〈stdlib.h> #define MAX 100 typedef struct char dm[5]; /* 产品代码 */ char mc[11]; /* 产品名称 */ int dj; /* 单价 */ int si; /* 数量 */ long je; /* 金额 */ PRO; PRO sell [MAX]; void ReadDat (); void WriteDat(); void SortDat() main ( ) memset(sell, 0, sizeof(sell)); ReadDat (); SortDat (); WriteDat (); void ReadDat () FILE *fp; char str[80], ch[11]; int i; fp = fopen("IN21.DAT", "r"); for(i=0; i〈100; i++) fgets(str, 80, fp); memcpy(sell[i].dm, str, 4); memcpy (sell [i] .mc, str + 4, 10); 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 = (long) sell[i].dj * sell[i] .sl; fclose (fp); void WriteDat() FILE *fp; int i; fp = fopen("OUT21.DAT", "w"); for(i = 0; i 〈 100; i++) fprintf(fp, "%s %s %4d %5d %101d\n", sell[i].dm, sell[i].mc, sell[i].dj, sell[i].sl, sell[i].je); fclose (fp);