Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include <fcntl.h>
- #include <unistd.h>
- int main()
- { int fd, c;
- fd = open("file", O_WRONLY);
- close(1);
- if (dup(fd) >= 0)
- {
- printf(" hello\n");
- write(1,"world",5);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement