join two files horizontally unix

C++
paste f1 f2
Source

Also in C++: