Scroll Down to See All▾
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1ynFunction Details : putwchar
wint_tputwchar(wchar_t wc) ;
Return Type : wint_t
An integer type capable of storing any wide character value or the special value WEOF, used in wide-character input/output functions.
Read about return values of putwchar function .
1st Parameter Type : wchar_t
A data type used to represent wide characters, typically supporting larger character sets such as Unicode. Its size is platform-dependent but is often 2 or 4 bytes.
1st Parameter
The wide character to be written to the standard output (`stdout`).
Read more about parameters of putwchar in parameters section
The putwcharfunction in C language Writes a wide character to the standard output stream.
The putwchar function writes a single wide character to the standard output stream (stdout). It's equivalent to putwc(wc, stdout). This function is particularly useful for outputting non-ASCII characters to the console in a locale-aware manner.
The putwcharfunction takes 1
parameter:Writes the wide character `wc` to the standard output (`stdout`). Returns the character written as a `wint_t` on success or `WEOF` if an error occurs. The function is commonly used for wide-character output in locales supporting extended character sets.
- •wchar_t `wc`: The wide character to be written to the standard output (`stdout`).
The putwchar function return value :
- Returns the wide character written as a wint_t value if successful, or WEOF if an error occurred
Output
This example demonstrates writing a wide character (an emoji) to stdout using putwchar. It includes proper locale setting and error checking.