title: Difference between write and fwrite not the same results
body: <p>If I have piece of code that writes out text like this: <code>write(1, buf, bytes);</code> why doesn't the same works for writing to a file <code>fwrite(1, buf, bytes,f1);</code>?</p>
  
  <p>Where <code>f1</code> is declared as <code>FILE *f1;</code> and <code>f1=fopen("Test.txt", "wb");</code>. The tutorials I'm looking at indicate that it should work. I'm C# coder and not a C coder and would like some help with this.</p>