sscanf
sscanf is a function in the C standard library that reads formatted input from a string. It is declared in stdio.h and serves as the string-input counterpart to scanf and fscanf. The function parses the input according to a format string and stores the results in variables supplied through additional arguments.
Signature and behavior: int sscanf(const char *str, const char *format, ...); It reads from str, applying the
Format and conversions: The format string controls how input is consumed. Whitespace in the format matches
Examples and cautions: Example: const char *s = "42 hello"; int n; char w[6]; sscanf(s, "%d %5s", &n,