Guest User

Untitled

a guest
May 24th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. int main(int ac, char **argv){
  6.  
  7. if(ac != 2){
  8.     printf("Argument manquant...");
  9.     return 0;
  10. }
  11. FILE *f = fopen(argv[1], "r+b");
  12. if (f == NULL){
  13.     printf("Erreur à l'ouverture du fichier...");
  14.     return 0;
  15. }
  16.  
  17.  
  18. fseek(f, 244, 0);
  19.  
  20. int buffer = 16;
  21. fwrite(&buffer, sizeof(buffer), 1, f);
  22.  
  23. //fprintf (f, buffer);
  24.  
  25. fclose(f);
  26. printf("Job done... tchuss.");
  27. return 0;
  28. }
Add Comment
Please, Sign In to add comment