qc.hlp (Table of Contents; Topic list)
scanf Non-Format Characters
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     The characters outside of format specifications are expected to
     match the sequence of characters in stdin outside of the input
     fields; the matched characters are scanned but not stored. These
     characters fall into the following two categories:
 
        ■ White-space characters: blank (" "), tab (\t), or
          newline (\n). A white-space character causes scanf to read,
          but not store, all consecutive white-space characters in the
          input up to the next non-white-space character. One
          white-space character in the format matches any number
          (including zero) and any combination of white-space
          characters in the input.
 
        ■ Non-white-space characters, except for the percent sign (%).
          A non-white-space character causes scanf to read, but not
          store, a matching non-white-space character. If the next
          character in stdin does not match, scanf terminates. The
          conflicting character is left in stdin as if it had not been
          read.
                                    -♦-