All pastes #898110 Raw Edit

Mine

public text v1 · immutable
·published 2008-02-10 02:14 UTC
rendered paste body
  char * temp_ptr;
  FILE * fp;
  fp = fopen ("test.txt", "r");
  if (fp == NULL) {
    printf ("error: file not found");
    exit (1);
  }
  while (!feof (fp)) {
    fgets (temp_ptr, 1024, fp);
    printf ("\n\ndata so far:  %s\n\n", temp_ptr);
  }
  fclose (fp);