int rename(const char * oldname, const char * newname);
rename() function is defined in stdio.h header file. It renames a file or directory from oldname to newname. The rename operation is same as move, hence you can also use this function to move a file.