fputwc(),fgetwc(), fputws(), fgetws() functions in C

fputwc() function: fputwc() function is used to write wide characters to a file.


wint_t fputwc(wint_t ch, FILE *str);

fgetwc() function: fgetwc() function is used to to read wide characters from a file.


wint_t fgetwc(FILE *str);

fputws() function: fputws() function is used to read wide strings from the keyboard and write it to a file.


int fputws(const wchar_t *str, FILE *str);

where, p is file pointer.

fgetws() function: fgetws() function is used to read a wide string from a stream until a new line character or length is length-1 where length is the length of the characters in the string.


wchar_t *fgetws(wchar_t *str, int length, FILE *str);


Leave a Reply