Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ffcccc
char *file_name;
FILE *fptr;

/* initializeInitialize file_name */

int c = getc(fptr = fopen(file_name, "r"));
if (c == EOF) {
  /* Handle error */
}

...

Code Block
bgColor#ccccff
int c;
char *file_name;
FILE *fptr;

/* initializeInitialize file_name */

fptr = fopen(file_name, "r");
if (fptr == NULL) {
  /* Handle error */
}

c = getc(fptr);
if (c == EOF) {
  /* Handle error */
}

...