皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
根据注解完成文件读写所有填空。管道分为无名管道和有名管道,无名管道用 pipe 创建,有名管道用 mkfifo 创建,管道实际上是文件,一端用于读,一端用于写。 #include #include #include #include #include #include #include int main(int argc,char *argv[]) { int fd[2]; // 创建无名管道 fd if( 填空 1 <0) printf("unable to create noname pipe\n"); else printf("create noname pipe success and the pipe ID are %d and %d \n",fd[0],fd[1]); char * pathname="mkfifofile"; unlink(pathname); // 创建有名管道,其存取权限为最高权限 if( 填空 2 <0) printf("unable to create pipe with name\n"); else printf("create pipe with name success\n"); int filefd; int len; char * buf[1024]; // 创建进程 if( 填空 3 ==0) { // 子进程将 pathname 的内容写入无名管道 len= 填空 4 ; printf("write info into the child of noname pipe is %s and the string length is %d\n",pathname,len); close(fd[0]); close(fd[1]); // 打开有名管道 filefd= 填空 5 ; if(filefd<0) printf("open pipe failed\n"); else { printf("open pipe success\n"); // 子进程将 pathname 的内容写入有名管道 filefd len=write(filefd,pathname,strlen(pathname)); printf("write info into the child of pipe with name is %s and the string length is %d\n",pathname,len); } close(filefd); } else { // 父进程读取无名管道内容到 buf 中 len= 填空 6 ; buf[len]='\0'; printf("read info from the child of noname pipe is %s and the string length is %d\n",buf,len); close(fd[0]); close(fd[1]); filefd=open(pathname,O_RDONLY); if(filefd<0) printf("open pipe failed\n"); else { printf("open pipe success\n"); // 父进程读取有名管道内容到 buf 中 len= 填空 7 ; buf[len]='\0'; printf("read info from the child of pipe with name is %s and the string length is %d\n",buf,len); } // 关闭有名管道 filefd 填空 8 ; } }
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】购进农产品,应按照农产品收购发票或者销售发票上注明的农产品买价的( )作为扣除率计算的进项税额。
A.
10%
B.
13%
C.
15%
D.
17%
【单选题】We are all for your suggestion that the trip ________ .
A.
was put off
B.
be put off
C.
is to put off
【单选题】购进农产品,应按照农产品收购发票或者销售发票上注明的农产品买价的( )作为扣除率计算的进项税额。
A.
10%
B.
13%
C.
15%
D.
17%
【多选题】下列属于成本管理工具和方法的有 ( )
A.
目标成本管理
B.
标准成本管理
C.
C 变 动成本管理
D.
作业成本管理
【简答题】以白鲢为例,说明消化器官与食性的相关性?
【简答题】选择正确的句子。 (     ) 1. A. Put on your slippers. (     ) 2. B. Put on your boots. (     ) 3. C. Put on your sandals. (     ) 4. D. Put on your sneakers.
【简答题】软产道临产前变化。 (1)子宫下段形成 非孕期长约 cm的子宫峡部,于孕 周后逐渐被拉长,以后进一步伸展达 cm,成 ,成为软产道的一部分。 (2)宫颈的变化 临产前宫颈管长2~3cm,临产后初产妇 ;经产妇 。宫口扩张 cm时,足月胎头方能通过。 (3)骨盆底软组织、阴道及会阴的变化 骨盆底、阴道及会阴的变化 宫口开全后胎先露下降至阴道,阴道黏膜皱襞展平、被动扩张。胎先露继续下降压迫盆底软组织...
【单选题】购进农产品,应按照农产品收购发票或者销售发票上注明的农产品买价的作为扣除率(( )计算的进项税额。
A.
9%
B.
10%
C.
13%
D.
17%
【单选题】患者男,55岁乙肝家族史10年,近半年来出现右上腹部疼痛,面色晦暗,并出现黄疸,拟诊“肝炎”,治疗后病情并无明显好转。初步诊断为
A.
肝硬化早期
B.
肝癌
C.
慢性肝炎
D.
肝脓肿
E.
慢性肝炎急性发作
【单选题】购进农产品,应按照农产品收购发票或者销售发票上注明的农产品买价的(    )作为扣除率计算进项税额。
A.
10%
B.
13%
C.
15%
D.
16%
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题