title: In C how do I print filename of file that is redirected as input in shell
body: <pre><code>$cc a.c
  $./a.out &lt; inpfilename
  </code></pre>
  
  <p>I want to print inpfilename on stdout.
  How do I do that ?
  Thanks for the help in advance...</p>