title: How to fdopen as open with the same mode and flags?
body: <p>I would like to have a <code>FILE*</code> type to use <code>fprintf</code>.
  I need to use <code>fdopen</code> to get a <code>FILE*</code> instead of <code>open</code> that returns an <code>int</code>.
  But can we do the same with <code>fdopen</code> and <code>open</code>? (I never used <code>fdopen</code>)</p>
  
  <p>I would like to do a <code>fdopen</code> that does the same as :</p>
  
  <pre><code>open("my_file", 0_CREAT | O_RDWR | O_TRUNC, 0644);
  </code></pre>