I have a source file file1 and a destination file file2, here I have to move content from file1 to file2.
So I have to do some validation first.
I must check source file is existing or not? I can check using this:
fp = fopen( argv[1],"r" ); if ( fp == NULL ) { printf( "Could not open source file\n" ); exit(1); }Then I have to check if the source file has any content or not? If it is empty, I have to throw some error message.
This is what I've tried until the moment.