Advertisement
ewelina_r

Program, który otworzy plik, napisze w nim '1234abcd' i zapi

Jan 16th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.20 KB | None | 0 0
  1. #include <fcntl.h>
  2. #include <stdio.h>
  3. #include <unistd.h>
  4.  
  5. int main(int argc, char ** argv, char **envv)
  6. {
  7.   int f = open("2.txt", O_WRONLY);
  8.   write(f, "1234abcd", 8); close(f);
  9.   return 0;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement