basic file utility programs in c/c++