This program will print the . . . . . . . . string.
#include<stdio.h>
int main()
{
int fd[2];
char buff[11];
if (pipe(fd) != 0)
perror("pipe");
write(fd[1],"Example",11);
lseek(fd[0],0,3);
read(fd[0],buff,11);
printf("%s\n",buff);
return 0;
}
#include<stdio.h>
int main()
{
int fd[2];
char buff[11];
if (pipe(fd) != 0)
perror("pipe");
write(fd[1],"Example",11);
lseek(fd[0],0,3);
read(fd[0],buff,11);
printf("%s\n",buff);
return 0;
}A. "Example"
B. "exam"
C. "linux"
D. none of the mentioned
Answer: Option A
Related Questions on Linux
What command is used to count the total number of lines, words, and characters contained in a file?
A. countw
B. wcount
C. wc
D. count p
E. None of the above
What command is used with vi editor to delete a single character?
A. x
B. y
C. a
D. z
E. None of the above

Join The Discussion