...
Code Block | ||
---|---|---|
| ||
enum { BUFFER_SIZE=256 }; char buffer[BUFFER_SIZE]; /* ... */ fgets(buffer, BUFFER_SIZE, stdin); |
Compliant Solution (
...
sizeof
...
)
A sizeof
expression can work just as well as an enumeration constant (see EXP09-A. Use sizeof to determine the size of a type or variable).
...