Page 1 of 1

What is the name of the myfile2 file after executing the following C++ code?

Posted: Wed Jul 13, 2022 7:53 pm
by answerhappygod
#include <stdio.h> int main () { int result; char oldname[] = "myfile2.txt"; char newname[] = "newname.txt"; result = rename(oldname, newname ); if (result == 0) puts ( "success" ); else perror( "Error" ); return 0; }
a) name
b) new
c) newname
d) Error