I have a program that creates multiple binary files. The problem is that I need to merge the files together. I can use the cat command afterwards and merge the files by hand. I would like however to merge the files together in the C program. I know I could just read in and write, but that sounds wasteful as cat seems to work much faster. Any help as usual appreciated.