Home / MCQ Bank / Computer
Computer 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; }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • newname

Related Computer Questions

Which of the following is not a component of an email address? What is the role of the Hadoop Mapper.Context in a MapReduce application? What is the result of the given postfix expression? abc*+ where a=1, b=2, c=3. Which of the following is not a transition effect? What will be the output of the following Python code? s='{0}, {1}, and {2}' s.format('hello', 'good', 'morning')