Hi i wrote the following program for concatenating two files.

But if the contents are as follows:

a.txt:
hi

b.txt:
all