The problem statements requires that the code should print the full path of test.txt. The code in the option does that. Yes, that code will also print full path of mytest.txt but that is fine because the problem statement does not require that path for only test.txt should be printed.
If you like our products and services, please help us by posting your review here.
Ok, but then i don't understand why it is important that is has exactly one regular test.txt file in the directory structure. If there were multiple test.txt, still the same answer would be correct.
Yes, but not everything given in the problem statement is necessarily important for the answer. In fact, you may find questions in the exam that seem to be about one thing but are actually about something entirely different.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.