C examples for File:File Operation
Rename a File
#include <stdio.h> int main()/* w w w . j a v a 2s . c o m*/ { int m; m = rename("C:\\Code\\data.txt", "C:\\Code\\city.dat"); if (m == 0) puts("Operation of renaming a file is successful."); if (m != 0) puts("Operation of renaming a file failed."); return(0); }