When the scanf function searches the input stream for a value to be read, it always
bypasses any leading so-called whitespace characters, where whitespace refers to either a
blank space, horizontal tab ('\t'), vertical tab ('\v'), carriage return ('\r'), newline
('\n'), or form-feed character ('\f').The exceptions are in the case of the %c format
characters—in which case, the next character from the input, no matter what it is, is
read—and in the case of the bracketed character string—in which case, the characters
contained in the brackets (or not contained in the brackets) specify the permissible characters
of the string.
The exceptions are in the case of the %c format
characters—in which case, the next character from the input, no matter what it is, is
read—and in the case of the bracketed character string—in which case, the characters
contained in the brackets (or not contained in the brackets) specify the permissible characters
of the string.
When the scanf function searches the input stream for a value to be read, it always bypasses any leading so-called whitespace characters, where whitespace refers to either a blank space, horizontal tab ('\t'), vertical tab ('\v'), carriage return ('\r'), newline ('\n'), or form-feed character ('\f').The exceptions are in the case of the %c format characters—in which case, the next character from the input, no matter what it is, is read—and in the case of the bracketed character string—in which case, the characters contained in the brackets (or not contained in the brackets) specify the permissible characters of the string.
The exceptions are in the case of the %c format characters—in which case, the next character from the input, no matter what it is, is read—and in the case of the bracketed character string—in which case, the characters contained in the brackets (or not contained in the brackets) specify the permissible characters of the string.