Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<unistd.h>
- #include<fcntl.h>
- #include<sys/types.h>
- #include<sys/stat.h>
- #include<string.h>
- int main() {
- char s[100] = "";
- char s1[1000] = "";
- int ff, file1;
- ff = open("fifo1", O_WRONLY);
- file1 = open("fifo2", O_RDONLY);
- printf("\nEnter file name:");
- scanf("%s", s);
- write(ff, s, strlen(s));
- while(read(file1, s1, 1000) != 0) {
- printf("File Content :%s", s1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment