title: temporary file location when using tmpfile() in C
body: <p><code>$ man tmpfile</code> says</p>
  
  <blockquote>
    <p>The  standard does not specify the directory that tmpfile() will use.
    Glibc will try the path prefix P_tmpdir defined in <code>&lt;stdio.h&gt;</code>, and if
    that fails the directory /tmp.</p>
  </blockquote>
  
  <p>I am using Ubuntu 13.10 x86_64, gcc and libc BTW.  </p>
  
  <p>So when I try to create temporary file using using tmpfile(), I can't see any temporary file in /tmp. ( I can see <code># define P_tmpdir    "/tmp"</code> in stdio.h). This is the code snippet I used:  </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(int argc, char **argv)
  {
      FILE *tmp;
  
      tmp = tmpfile();                            // Where's this file?
      scanf("%*d");
  
      return 0;
  }
  </code></pre>
  
  <p>
  <code>$ ./tmpfile</code><br>
  Now while scanf is waiting for the next (redundant) input I should have been able to see a temporary file in /tmp. But I can't. So Where does exactly this tmpfile get created? </p>