Versions Compared

Key

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

...

This code calls the getc() function with an expression as an argument. If getc() is implemented as a macro expansion, the file may be opened several times (see FIO31-C. Do not simultaneously open a the same file multiple times).

Code Block
bgColor#ffcccc
char const *filename = "test.txt"; 
FILE *fptr; 
 
int c = getc(fptr = fopen(filename, "r")); 

...