...
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 | ||
|---|---|---|
| ||
char const *filename = "test.txt"; FILE *fptr; int c = getc(fptr = fopen(filename, "r")); |
...