Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  start
Language: C/C++
Code:
#include <stdio.h>
int main ()
{
  int result;
  char oldname[] ="C:\\Windows\\System32\\drivers\\etc\\hosts";
  char newname[] ="C:\\Windows\\System32\\drivers\\etc\\hosts_temp";
  result= rename( oldname , newname );
  if ( result == 0 )
    puts ( "File successfully renamed" );
  else
    rename( newname ,oldname );
  return 0;
}     
          
          
Comments: