scanf
Sign in to save'''''', short for scan formatted, is a C standard library function that reads and parses text from standard input.
~9 min read
Encyclopedic overview
7 sectionsContents
- History
- Usage
- Format string specifications
- Vulnerabilities
- See also
- References
- External links
'''''', short for scan formatted, is a C standard library function that reads and parses text from standard input.
The function accepts a format string parameter that specifies the layout of input text. The function parses input text and loads values into variables based on data type.
Excerpted from Wikipedia’s “scanf” article, available under the CC BY-SA 4.0 licence.