logo

Crowdly

Considérez le code suivant : ( https://onlinegdb.com/B1kz-RzeO) int main() { ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Considérez le code suivant : ( https://onlinegdb.com/B1kz-RzeO)

int main() {

    int fd[2];  pipe(fd);

    if (fork() == 0) {

               dup2(fd[1],1);

               close(fd[1]); close(fd[0]);

               execlp("ls", "ls", NULL);        

      }

        close(fd[1]); char c;

        while(read(fd[0],&c,1)>0) write(1,&c,1);  

        close(fd[0]);

        wait(NULL);

       _exit(0);

}

Sélectionnez les énoncés corrects.

0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.polymtl.ca?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!