Back to index

glibc  2.9
tst-wc-printf.c
Go to the documentation of this file.
00001 #define _GNU_SOURCE 1
00002 #include <wchar.h>
00003 #include <stdio.h>
00004 #include <string.h>
00005 #include <wctype.h>
00006 
00007 int
00008 main (void)
00009 {
00010   wchar_t tmp[3];
00011   tmp[0] = '8';
00012   tmp[1] = '1';
00013   tmp[2] = 0;
00014 
00015   printf ("Test for wide character output with printf\n");
00016 
00017   printf ("with %%S: %S\n", tmp);
00018 
00019   printf ("with %%C: %C\n", (wint_t) tmp[0]);
00020 
00021   return 0;
00022 }