/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/*  This is an example of the function wctomb(char*, wchar_t).  This function
    determines the number of bytes needed to represent the equivalent mulitbyte
    character.
*/
#include <wchar.h>
#include <stdlib.h>

int main() {
    wint_t wc;        
    int retval;
    wc=L'r';

    retval = wctob(wc);
    if(retval != EOF) {
        printf("wctob() = ");
     	fputc(retval, stdout);
    	printf("\n");
    }
    else
  	printf("error\n");
}

