题目内容

Christmas is coming. It is celebrated(庆祝) every year on December 25 and it is the most celebrated holiday in the world. It is celebrated in Europe, North America, South America and in every country that has been touched by western culture. Christmas celebrates the birth of Jesus Christ. Today, most people who celebrate Christmas are not Christians(基督徒). They celebrate the holiday because Christmas is an opportunity for people to show the "good feelings" they have for each other. Christmas is called "the season of giving". It is the time of year when people give gifts to others to show how much they love them or just to show how much they appreciate(感激) them. We give gifts to our family and we also give gifts to close friends. Many people also give gifts to people who have performed services for them through the year, like the postman or the cleaner. And Christmas is the time of year we remember that many people are less fortunate than us: the poor, the sick and the lonely; and we try to help them in any way we can. Postmen and cleaners don’t work on Christmas.

A. Right.
B. Wrong.
C. Doesn’t say.

查看答案
更多问题

【说明】 本程序从若干个原始文件合并成的合并文件中恢复出其中一个或全部原始文件。所有文件均作为二进制文件进行处理。合并文件中先顺序存储各原始文件,然后顺序存储各原始文件的控制信息,即文件名、文件长度和在合并文件中的位置(偏移量)。其结构为: typedef struct {char fname [256] /*原始文件名*/ long length; /*原始文件长度(字节数)*/ long offset; /*原始文件在合并文件中的位置(偏移量)*/ }FileInfo; 在合并文件最后存储如下一个特殊的标志信息作为合并文件的结束标记: FileInfo EndFlag={"Combined File",0,_offset}; 其中_offset是第一个原始文件的控制信息在合并文件中的位置(偏移量)。 启动本程序的命令行的格式是: 程序名 合并文件名 [原始文件名] 如果不指定原始文件名,默认恢复合并文件中的所有原始文件。 程序中涉及的部分文件操作的库函数简要说明如下: int fread(void * buffer,int size,int count,FILE * fbin):从二进制文件流fbin中读取 count块长度为size字节的数据块到buffer指向的存储区。返回值为实际读取的数据块数。 int fwrite(void * buffer,int size,int count,FILE * fbin):各参数和返回值的意义与fread相同,但对文件进行写操作。 int fseek(FILE * fbin,long offset,int position):将文件流fbin的读/写位置以position为基准移动offset字节。position的值可以是SEEK_SET(文件头),SEEK_CUR(当前位置), SEEK_END(文件尾);offset为正,表示向文件尾方向移动,为负表示向文件头方向移动,为零表示到基准位置。 long ftell(FILE * fbin):返回文件流fbin的当前读/写位置(相对于文件头的偏移量)。上述偏移量均以字节为单位,即偏移字节数。 【程序】 #include <stdio. h> #include <string. h> typedef struct { char fname[256];long lengt;long offset; } Filelnfo; void copyfile( FILE*fin, FILE * fout,int fsize) { char buf[1024];int siz=1024; while(fsize !=0){ /*每次复制siz个字节,直至复制完fsize个字节*/ if(siz >fsize) (1) ; fread(buf,1,siz,fin); fwrite(buf,1,siz,fout); fsize= (2) ;} } int dofile(FILE * fin,Filelnfo * inp) { long offset; FILE * fout; if (( fout = fopen ( inp - > fname ,"wb" ))==NULL) { printf("创建文件错误: %s\n" , inp -> fname); return 1; } offset= (3) ; /*保留合并文件读/写位置*/ fseek( (4) ); /*定位于被恢复文件首*/ copyfile ( fin, fout, inp - > length); fclose(fout); printf("\n ---文件名: %\n 文件长: %ld. \n",inp -> fname, inp -> length); (5) ; /*恢复合并文件读/写位置*/ return 0; } int main( int argc, char * argv[ ]) { Filelnfo finfo; char fname[256] ;FILE * fcmbn; if(argc <2) { printf("输入合并文件名:" ) ;scanf("%s" ,fname); else strcpy(fname,argv[1]); if((fcmbn = fopen(fname,"rb" )) == NULL) { printf("文件打开错误: %s\n" ,fname);return 1; } fseek(fcmbn, -sizeof(Filelnfo),SEEK_END); /*定位于合并文件末尾的标志信息*/ fread(&finfo,1,sizeof(Filelnfo) ,fcmbn); if(finfo. length!=0||strcmp(finfo. fnane," CombinedFile" )){ printf("指定的文件不是合法的合并文件\n"); fclose (fcmbn); return 2; } fseek(fcmbn,finfo. offset,SEEK_SET); /*定位于首个原始文件的控制信息*/ for(;;){ /*恢复一个(argc>2)或全部(argc=2)原始文件*/ fread ( &finfo,1, sizeof (Fitelnfo), fcmbn); if(finfo, length ==0) break; if (argc> 2 && strcmp(finfo. fname,argv[2] )) continue; if (dofile ( fcmbn, &finfo)!=0) break; } fcolse(fcmbn);return 0; }

If you are a young college student, most of your concerns about your health and happiness in life are probably(S1)__________ on the present. Basically, you want to feel good physically, mentally, and(S2) _________ now. You probably don’’t spend much time worrying about the(S3)_________ future, such as whether you will develop heart disease, or (S4) ________, how you will take care of yourself in your (S5) ________ years, or how long you are going to live. Such thoughts may have (S6) _________ your mind once in a while, however, If you are in your thirties, forties, fifties, or older, such health related thoughts are likely to become (S7) _______important to you. (S8) ________ that will help you feel better physically and mentally. Recently researchers have found that, even in late adulthood, exercise, strength training with weights, and better food can help elderly individuals significantly improve their health and add happiness to their life. (S9) ________ giving us the opportunity to avoid some of the health problems that have troubled them. (S10) ________.

Christmas is coming. It is celebrated(庆祝) every year on December 25 and it is the most celebrated holiday in the world. It is celebrated in Europe, North America, South America and in every country that has been touched by western culture. Christmas celebrates the birth of Jesus Christ. Today, most people who celebrate Christmas are not Christians(基督徒). They celebrate the holiday because Christmas is an opportunity for people to show the "good feelings" they have for each other. Christmas is called "the season of giving". It is the time of year when people give gifts to others to show how much they love them or just to show how much they appreciate(感激) them. We give gifts to our family and we also give gifts to close friends. Many people also give gifts to people who have performed services for them through the year, like the postman or the cleaner. And Christmas is the time of year we remember that many people are less fortunate than us: the poor, the sick and the lonely; and we try to help them in any way we can. We give gifts to family and friends because in this way we can get something back.

A. Right.
B. Wrong.
C. Doesn’t say.

在计算机通信中,必须将数字信号转换成适于传输的模拟信号后.通过传输线路进行远距离传送;在接收端又必须将接收到的模拟信号恢复到原来的数字信号。实现此功能的方法是将微型计算机与电话系统之间连接上______。

答案查题题库