The increment is because it's in a (stupid) loop:
while(n-->0)
flag=write(f1,argv[2]++,1);
but your code isn't indented so it's a bit harder to see.
argv[2]
is a char *
pointing at the string entered as the third word on the command-line, so incrementing it steps it to the next character in the string.
This is bad code; it should be write(fl, argv[2], n);
to write it all at once. Of course, the return value must still be inspected and the write()
maybe looped to try again or resume if there is a partial write.