Skip to content

Instantly share code, notes, and snippets.

@nevyn
Created May 4, 2009 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nevyn/106395 to your computer and use it in GitHub Desktop.
Save nevyn/106395 to your computer and use it in GitHub Desktop.
11:36:03 nevyn:Desktop$ ccons
>>> #include <stdio.h>
>>> FILE *f = fopen("foo.txt", "w");
>>> fprintf(f, "hej\n");
=> (int) 4
>>> fflush(f);
=> (int) 0
// Here, I moved the file from the desktop to my home folder
>>> fprintf(f, "hej\n");
=> (int) 4
>>> fflush(f);
=> (int) 0
>>> ^D
11:39:32 nevyn:Desktop$ cat ~/foo.txt
hej
hej
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment