c program for file manipulation