eg0rmaffin

aff_last_param

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