printf( "Convert multibyte character back to a wide " "character:\n" ); i = mbtowc( pwc, pmbc, MB_CUR_MAX ); printf( " Bytes converted: %u\n", i ); printf( " Wide character: %x\n\n", *pwc ); printf( "Attempt to convert when target is NULL\n" ); printf( " returns the length of the multibyte character:\n" ); i = mbtowc( pwcnull, pmbc, MB_CUR_MAX ); printf( " Length of multibyte character: %u\n\n", i );
printf( "Attempt to convert a NULL pointer to a" ); printf( " wide character:\n" ); pmbc = NULL; i = mbtowc( pwc, pmbc, MB_CUR_MAX ); printf( " Bytes converted: %u\n", i ); }