0065-btowc.c (241B)
1 #include <assert.h> 2 #include <stdio.h> 3 #include <wchar.h> 4 5 /* 6 output: 7 testing 8 done 9 end: 10 */ 11 12 int 13 main(void) 14 { 15 puts("testing"); 16 assert(btowc('a') == 'a'); 17 assert(btowc(EOF) == -1); 18 assert(btowc('\x99') == -1); 19 puts("done"); 20 21 return 0; 22 }