title: How to get a file's name from FILE* struct in C
body: <p>Is it possible to retrieve a file's name in C? If a file is created like the following:</p>
  
  <pre><code>     FILE *f = fopen ("foo.txt", "r");
  </code></pre>
  
  <p>And the "foo.txt" comes from a variable out of scope. Is there a way to retrieve it from the FILE struct?</p>