towupper.c 268 B

123456789101112
  1. #include <stdio.h>
  2. #include <wchar.h>
  3. #include <wctype.h>
  4. int main() {
  5. wchar_t *str = L"HaLf WiDe ChAr StRiNg!\n";
  6. fputws(str, stdout);
  7. for (int i = 0; i < wcslen(str); i++) {
  8. putwchar(towctrans(str[i], wctrans("toupper")));
  9. }
  10. return 0;
  11. }