Scroll Down to See All▾
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1ynFunction Details : sscanf
intsscanf(const char * str,const char * format,... args) ;
Return Type : int
Integer type (typically 4 bytes, -2,147,483,648 to 2,147,483,647)
Read about return values of sscanf function .
1st Parameter Type : const char *
Pointer to read-only string
1st Parameter
Pointer to the null-terminated input string to be parsed.
2nd Parameter Type : const char *
Pointer to read-only string
2nd Parameter
A null-terminated format string specifying how to interpret the input string, containing format specifiers like `%d`, `%s`, or `%f`.
3rd Parameter Type : ...
Represents a variable number of arguments in a function. Used in functions like `printf` or `fprintf` to accept additional parameters beyond those explicitly declared.
3rd Parameter
A variable number of pointers to variables where the parsed input values will be stored.
Read more about parameters of sscanf in parameters section
The sscanffunction in C language Reads formatted input from a string.
The sscanf function reads formatted input from a string. It parses the C string str interpreting its content according to the format specified in format, which follows the same specifications as those for scanf. The resulting values are stored in the locations pointed by the additional arguments.
The sscanffunction takes 3
parameters:Parses the input string `str` according to the `format` string and stores the converted values into the variables pointed to by `args`. Returns the number of successfully matched and assigned input items, or `EOF` if an input failure occurs before any items are matched.
- •const char * `str`: Pointer to the null-terminated input string to be parsed.
- •const char * `format`: A null-terminated format string specifying how to interpret the input string, containing format specifiers like `%d`, `%s`, or `%f`.
- •... `args`: A variable number of pointers to variables where the parsed input values will be stored.
The sscanf function return value :
- Returns the number of items successfully filled
- This count can match the expected number of items or be less (even zero) in case of a matching failure
- EOF is returned if the end of the input string is reached before any conversion
Output
This example demonstrates basic usage of sscanf to parse a string containing a name, age, and height.