Guest User

Untitled

a guest
Nov 26th, 2019
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. #include <unistd.h>
  2.  
  3. int main(void)
  4. {
  5.     char c;
  6.     char c16[2];
  7.     c16[1] = 0;
  8.     while (read(0, &c, 1)){
  9.         c16[0] = c;
  10.         write(1, &c16, 2);
  11.     }
  12.     c16[0] = 0;
  13.     write(1, &c16, 2);
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment