title: How can I move a file pointer to the next line in a file?
body: <p>I am attempting to write a function that reads through a line, saves each character to an array, manipulates that character array, prints the results to another file, then moves on to the next line in the file.</p>
  
  <p>Some sample input/output would be as follows (the purpose of the program is to find the derivative - but that part of the code is working fine.):  </p>
  
  <pre><code>INPUT:
  x
  4x^4
  91
  sinx
  
  OUTPUT:
  1
  16x^3
  0
  cosx
  </code></pre>
  
  <p>The function that I have written so far:</p>
  
  <pre><code>int main(){
  
      FILE *inptr = fopen("functions.txt", "r");
      FILE *outptr = fopen( "derive.txt", "w");
  
      if(inptr)
          derive(inptr,outptr);
  
      return 0;
  }
  
  void derive(FILE *inptr, FILE *outptr){
      int i;
      char in = '0';
      char array[MAX];
  
      while((in = fgetc(inptr)) != EOF){
          for(i = 0; in != '\n'; i++){
              fscanf(inptr, "%c", &amp;in);
              array[i] = in;
          }
          manipulate(array, outptr); // Function that finds the derivative and prints to output file
      }
  }
  </code></pre>
  
  <p>My question is: How can I move the file pointer inptr to the next line?</p>