User Tools

Site Tools


Programming Reference/Librarys

Question & Answer

Q&A is closed



   #include <wchar.h>
   wint_t fputwc(wchar_t, FILE *);


fputwc writes a single wide-character to the stream at the position of the file pointer and advances the pointer.
If the write was successful, the character that was written is returned. Otherwise, the function returns WEOF.

fputwc C Sourcecode Example

 * fputwc example code
#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
#include <wchar.h>
#include <locale.h>
int main( void )
    wchar_t string[] = L"fputwc example for ÖÄÜß\n";
    int i = 0;
    while (string[i] != 0) {
        if (fputwc(string[i], stdout) == WEOF) {
            return 1;
    return 0;

output - fgetws example code

  fputwc example for ÖÄÜß

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/wchar.h/fputwc.txt · Last modified: 2024/02/16 01:05 (external edit)

Impressum Datenschutz