Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fcntl.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <errno.h>
- int main(int argc, char * argv[])
- {
- int deskryptor = open(argv[1], O_WRONLY|O_CREAT, 0777);
- if(argc!=2)
- {
- fprintf(stderr,"Wywolaj program w formacie %s <nazwa_pliku_do_utworzenia>\n",argv[0]);
- exit(1);
- }
- if(close(deskryptor)==-1){
- perror("Błąd zamknięcia pliku");
- exit(1);
- }
- exit(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement