Advertisement
Le_BuG63

Untitled

Oct 8th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <unistd.h>
  3.  
  4. void my_putchar(char ch) {
  5.     if(ch)
  6.         write(stdout, &ch, sizeof(ch));
  7. }
  8.  
  9. void putstr(const char *str) {
  10.     if(str)
  11.         while(*str != '\0') {
  12.             my_putchar(*str);
  13.             ++str;
  14.         }
  15.     else {
  16.         putstr("(null)");
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement