ExamVeda
Login
Home
C plus plus miscellaneous
?

What is the name of the myfile2 file after executing the following C++ code?
#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;
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.