题目内容

Many students find the experience of attending university lectures to be a confusing and frustrating experience. The lecturer speaks for one or two hours, perhaps (61) the talk with slides, writing up important information on the blackboard, (62) reading material and giving out (63) The new student sees the other students continuously writing on notebooks and (64) what to write. Very often the student leaves the lecture (65) notes which do not catch the main points and (66) become hard even for the students to understand. Most institutions provide courses which (67) new students to develop the skills they need to be (68) listeners and note-takers. (69) these are unavailable, there are many useful study-skills guides which (70) learners to practice these skills independently. In all cases it is important to (71) the problem before actually starting your studies. It is important to (72) that most students have difficulty in acquiring the language skills (73) in college study. One way of (74) these difficulties is to attend the language and study-skills classes which most institutions provide throughout the (75) year. Another basic strategy is to find a study partner with whom it is possible to identify difficulties, exchange ideas and provide support.

A. preventing
B. withstanding
C. sustaining
D. overcoming

查看答案
更多问题

水火既济的两脏是

A. 心、肺
B. 肺、脾
C. 心、肾
D. 肝、肾
E. 心、肝

回答以下问题。 若设置域名解析服务器,已知该文件服务器上文件named.boot的内容如下: Directory/var/named Cachenamed.root Primary 0.0.127 in-addr.arpanamed.local Primary net.edu.cnnet.edu.cn.hosts Primary 58.112.202.in-addr.arpanet.edu.cn.rev Secondary edu.cn 202.112.0.33edu.cn.2nd Forward 202.112.0.35 【问题2】 使用DNS服务器时,该服务器是哪个域名的主服务器该域对应的IP地址是多少

Many students find the experience of attending university lectures to be a confusing and frustrating experience. The lecturer speaks for one or two hours, perhaps (61) the talk with slides, writing up important information on the blackboard, (62) reading material and giving out (63) The new student sees the other students continuously writing on notebooks and (64) what to write. Very often the student leaves the lecture (65) notes which do not catch the main points and (66) become hard even for the students to understand. Most institutions provide courses which (67) new students to develop the skills they need to be (68) listeners and note-takers. (69) these are unavailable, there are many useful study-skills guides which (70) learners to practice these skills independently. In all cases it is important to (71) the problem before actually starting your studies. It is important to (72) that most students have difficulty in acquiring the language skills (73) in college study. One way of (74) these difficulties is to attend the language and study-skills classes which most institutions provide throughout the (75) year. Another basic strategy is to find a study partner with whom it is possible to identify difficulties, exchange ideas and provide support.

A. attributing
B. contributing
C. distributing
D. explaining

网络应用的基本模型是客户机/服务器模型,这是一个不对称的编程模型,通信的双方扮演不同的角色:客户机和服务器。本题中的程序,客户机接收用户在键盘上输入的文字内容,服务器将客户机发送来的文字内容直接返回给客户机。 此程序中,用户自定义函数有: int read_all( int fd, void*buf, int nbyte ); 函数read all从参数fd指定的套接字描述符中读取nbytes字节数据至缓冲区buf中,成功返回实际读的字节数(可能小于nbyte),失败返回-1。 int write_all( int fd, void*buf, int nbyte ); 函数write_all向参数fd指定的套接字描述符中写入缓冲区buf前nbyte字节的数据,成功返回实际写的字节数(始终等于nbyte),失败返回-1。 write_requ函数为客户机发送请求的函数;read_requ函数为服务器获取请求的函数 服务器主程序部分: #define SERVER_PORT 8080 //服务器监听端口号为8080 #define BACKLOG 5 //连接请求队列长度 int main( int argc, char*argv[]) { int listenfd, connfd //监听套接字、连接套接字描述符 struct sockaddr_in servaddr; //服务器监听地址 listenfd=(1); //创建用于监听的套接字 if (listenfd<0) { fPrintf( stderr,"创建套接字错误!"); exit(1); } //套接字创建失败时打印错误信息 bzero(&servaddr.sizeof(servadd));//将地址结构置空 servaddr.sin_family=AF_INET;//设置地址结构遵循TCP/IP协议 servaddr.sin_addrs_addr=htonl.(2);//设置监听的IP地址为任意合法地址,并将该地址转换为网络字节顺序 servaddr.sin_port=(3);//设置监听的端口,并转化为网络字节顺序 if ( bind(4)<0 ) { fprintf( stderr,"绑定套接字与地址!"); exit(1); } //将监听地址与用于监听的套接字绑定,绑定失败时打印错误信息 if ( listen( listedfd, BACKLOG)<0) { fprintf( stderr,"转换套接字为监听套接字!"); exit(1); } //将用于监听的套接字由普通套接字转化为监听套接字 for(;){ connfd=(5); //从监听套接字的连接队列中接收已经完成的连接,并创建新的连接套接字 if(connfd<0){ fprintf(stderr,"接收连接失败!"); exit(1); } //接收失败打印错误信息 serv_respon(connfd); //运行服务器的处理函数 (6);//关闭连接套接字 } close(listenfd);//关闭监听套接字 } 服务器通信部分: #include<stdio.h> ……//引用头文件部分略> void serv_respon( int sockfd) { int nbytes; char buf[1024]; for(;;) { nbytes=read_requ(sockfd, buf, 1024); //读出客户机发出的请求,并分析其中的协议结构,获知请求的内容部分的长度,并将内容复制到缓冲区buf中, if ( nbytes=0) return;//如客户机结束发送就退出 else if ( bytes<0 ) { fprintf( siderr,"读错误情息:%s\n", sterror( errno )); return; }//读请求错误打印错误信息 if ( write_all ( sockfd, buf, nbytes)<0) //将请求中的内容部分反向发送回客户机 fprintf( siderr,"写错误信息:%s\n", strerror( errno ) ); } } int read_requ( int sockfd, char*buf int size ) { char inbuf[256]; int n; int i; i=read_line( sockfd, inbuf, 256 ); //从套接字接收缓冲区中读出一行数据,该数据为客户请求的首部 if(1<O)return(1); else if ( i=0 ) return(0); if ( strncmp( inbuf,"",6 )=0) sscanf( (7),"%d", &n );//从缓冲区buf中读出长度信息 else{ sprintf( buf," ",14 ); return(14); }//取出首部Length域中的数值,该数值为内容部分的长度 return( read_all( sockfd, buf, n ) );//从接收缓冲区中读出请求的内容部分 } int get_char(int fd, char*ch) { static int offset=0; static int size=0; static char buff[1024]; //声明静态变量,在get_char多次被调用期间,该变量的内存不释放 for ( ;size<=0 ||(8);) { size=read(fd,buf,1024);//一次从套接字缓冲区中读出一个数据块 if ( size<0 ) { if ( errno=EINTR ) { size=0; confine; //EINTR表示本次读操作没有成功,但可以继续使用该套接字读出数i }else return(-1); } offset=0;//读出数据后,将偏址置为0 } *ch=buf[(9)];//将当前的字符取出,并将偏址移向下一字符 return(1); } int read_line(int fd, char*buf, int maxlen) { int i,n; char ch; for ( i=0; i<maxlen;) { n = get_char( fd, &ch );//取出一个字符 if ( n==1 ){ buff[i++]=ch;//将字符加入字符串中 if ( (10) break; }else if ( n< ) return(-1); else break; } buf[i]=’\0’; return(i); } //函数read_line的作用是读出请求的首部,其处理的方法是每次调用get_char函数,取出一个字符,检查该字符是否是回车符‘\n’,如果是回车符,就返回请求的首部。 //get_char的处理方式较为特殊,并不是每次调用read函数读一个字符,而是一次从缓冲区中读一块内容,再一次一个字符提交给函数read_line,如果提交完了就再读一块,这样就可以提高读缓冲区的效率。另外,由于客户机是分两次调用writ_all函数将请求的首部和内容发送给服务器,因此get_char不会取出请求内容部分的字符。

答案查题题库