题目详情
单选题 下面语句中,实现输入重定向的是______
A. fd1=open("f1",O_RDWR); close(0); dup(fd1)
B. fd1=open("f1",O_RDWR); close(0); dup2(fd1,1)
C. fd1=open("f1",O_RDWR); close(1); dup(fd1)
D. fd1=open("f1",O_RDWR); close(2); dup(fd1)

学科:Linux系统编程
时间:2025-11-19 08:14:50
相关题目
相关作业
