fork(1) download
  1. #include <wchar.h>
  2. #include <stdio.h>
  3.  
  4. int main(void) {
  5.  
  6. char* s1 = "\0H\0e\0l\0l\0o";
  7. char* s2 = "H\0e\0l\0l\0o\0";
  8.  
  9. wprintf((const wchar_t*) s1);
  10. wprintf((const wchar_t*) s2);
  11.  
  12. printf("\n--------\n");
  13. const wchar_t* ws1 = (const wchar_t*) s1;
  14. for (int i = 0; i < 5; i++) {
  15. printf("%d ", ws1[i]);
  16. }
  17. printf("\n");
  18. const wchar_t* ws2 = (const wchar_t*) s2;
  19. for (int i = 0; i < 5; i++) {
  20. printf("%d ", ws2[i]);
  21. }
  22. printf("\n--------\n");
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout
??????????<???????X?????????????????????????