Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <unistd.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <stdlib.h>
- int main()
- {
- char c;
- int in, out;
- in = open("in.dat", O_RDONLY);
- out = creat("out.dat", 0644);
- while (read(in, &c, 1) == 1) {
- write(out, &c, 1);
- }
- close(in);
- close(out);
- exit(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement