Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : vscanf

intvscanf(const char * format,va_list args) ;

Return Type : int

Integer type (typically 4 bytes, -2,147,483,648 to 2,147,483,647)
Read about return values of vscanf function .

1st Parameter Type : const char *

Pointer to read-only string

1st Parameter

Pointer to a null-terminated string specifying the format to interpret the input. It may include format specifiers like `%d`, `%s`, etc.

2nd Parameter Type : va_list

A data type used to hold information about variable arguments passed to a variadic function. It is initialized with `va_start`, used with `va_arg`, and cleaned up with `va_end`.

2nd Parameter

A `va_list` object containing pointers to variables where the parsed input values will be stored. The `va_list` must be initialized with `va_start`.

Read more about parameters of vscanf in parameters section
The vscanffunction in C language Reads formatted input from the standard input using a va_list.
vscanf is similar to scanf, but instead of taking a variable number of arguments, it takes a va_list that has been initialized by va_start. This function is useful for implementing custom variadic functions that need to forward their arguments to scanf for input parsing.
The vscanffunction takes 2 parameters:
  • const char * `format`: Pointer to a null-terminated string specifying the format to interpret the input. It may include format specifiers like `%d`, `%s`, etc.
  • va_list `args`: A `va_list` object containing pointers to variables where the parsed input values will be stored. The `va_list` must be initialized with `va_start`.
Reads input from the standard input (`stdin`) and matches it against the format string `format`. The extracted values are stored in the locations specified by the `va_list` object `args`. Returns the number of successfully matched and assigned input items, or `EOF` if an error occurs or the end of the input stream is reached before any matches.
The vscanf function return value :
  • Returns the number of input items successfully matched and assigned, or EOF if an error occurred before any conversion

Output

This example demonstrates using vscanf in a custom function to read formatted input from the standard input.