Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Copying One File to another in C

Copying One File to another in C

This is a simple C program that copies the contents of one ASCII (text) file onto another file. It is similar to Unix’s cp  command.

Elon Musk
Discover the mind behind the innovations – Elon Musk by Walter Isaacson, now on Audible. Dive into the life of a visionary shaping our future!
View on Amazon

This C program is called with two parameters i.e. the names of two files (fin and fout). The contents of the file referenced in second parameter are copied onto the file which is referenced by first parameter.

 

About The Author

M. Saqib

Saqib is Master-level Senior Software Engineer with over 14 years of experience in designing and developing large-scale software and web applications. He has more than eight years experience of leading software development teams. Saqib provides consultancy to develop software systems and web services for Fortune 500 companies. He has hands-on experience in C/C++ Java, JavaScript, PHP and .NET Technologies. Saqib owns and write contents on mycplus.com since 2004.