INFO: Next scanf/fscanf Apparently Is Skipped During Run Time (42075)
The information in this article applies to:
- The C Run-Time (CRT), when used with:
- Microsoft Visual C++ for Windows, 16-bit edition 1.0
- Microsoft Visual C++ for Windows, 16-bit edition 1.5
- Microsoft Visual C++, 32-bit Editions 1.0
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 5.0
- Microsoft Visual C++, 32-bit Editions 6.0
This article was previously published under Q42075 SUMMARY
When a function of the scanf() family reads a white-space character--blank
(' '), tab ('\t'), or newline ('\n')--it does not ordinarily store that
character into the location provided by the argument pointer. However, as
documented in the Microsoft C Run-Time Library Reference, if the %c type
field format specifier is used, the scanf() functions will store a white-
space character. This behavior can cause unexpected results.
| Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
|---|
| Keywords: | kbcode kbCRT kbinfo KB42075 |
|---|
|