wctob()

Converts a wide character to a character.

  #include <wchar.h>
  
  int wctob(wint_t wc);    
Parameter

wc

The wide character to be converted.

Remarks

The function wctob() returns the single byte representation of the argument wc as an unsigned character value. If wc does not contain a wide character that can be translated to a regular character, this function returns EOF.

The function returns its result as a value of type int to accommodate values of type unsigned char and the value EOF.