Versions Compared

Key

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

...

  • using invalid conversion specifiers
  • using a length modifier on an incorrect specifier
  • argument and conversion specifier type mismatch
  • using invalid character classes

The following are C99 compliant conversion specifiers. Using any other specifier may result in undefined behavior.

...

Code Block
d, i, o, u, x, X, a, A, e, E, f, F, g, G

Also, character class ranges must be properly specified, with a hyphen in between two printable characters. The two following lines are both properly specified. The first accepts any character from a-z, inclusive, while the second accepts anything that is not a-z, inclusive.

Code Block

[a-z]
[^a-z]

Having an argument and conversion specifier mismatch may result in undefined behavior.

...