eg0rmaffin

aff_first_param

Jul 25th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <unistd.h>
  2.  
  3. int     main(int argc, char **argv)
  4. {
  5.     if (argc < 2)
  6.     {
  7.         write(1, "\n", 1);
  8.         return 0;
  9.     }
  10.     int run = 0;
  11.     while (argv[1][run] != '\0')
  12.     {
  13.         write(1, &argv[1][run], 1);
  14.         run++;
  15.     }
  16.     write(1, "\n", 1);
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment