title: Resetting pointer to the start of file
body: <p>How would I be able to reset a pointer to the start of a commandline input or file. For example my function is reading in a line from a file and prints it out using getchar()</p>
  
  <pre><code>    while((c=getchar())!=EOF)
      {
          key[i++]=c;
          if(c == '\n' )
          {
              key[i-1] = '\0'
              printf("%s",key);
          }       
      }
  </code></pre>
  
  <p>After running this, the pointer is pointing to EOF im assuming? How would I get it to point to the start of the file again/or even re read the input file</p>
  
  <p>im entering it as (./function &lt; inputs.txt)</p>