All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.
Moderators: Site Manager, fjwalraven
- Posts: 35
- Joined: Sat Jun 06, 2020 4:51 pm
The wording of this question is very confusing as the first phrase contradicts the second phrase. First it stated that the argument was given on the CLI, but then it stated that no argument was given. The confusion here is, "The program cannot print out the last argument AND [when] no argument was given
print the last argument given on the command line to the standard output, and exit without any output or exception stack trace if no arguments are given?
I had to read it for a long time to finally understand that the specifications are independent of one another. Changing "and" to "or" fixed it.
print the last argument given on the command line to the standard output, OR exit without any output or exception stack trace if no arguments are given?
- Site Admin
- Posts: 9425
- Joined: Fri Sep 10, 2010 9:26 pm
I respectfully disagree because the second phrase uses "if", "and exit without any output or exception stack trace if no arguments are given". That makes the intention of the question quite clear.
Further, if you are talking about logical precision, here is another interpretation:
There are two requirements to be fulfilled -
1. If there are arguments, print the last argument
2. If there is no argument, print nothing.
Both 1 and 2 have to be fulfilled by the program.
If we go by your interpretation, the program would be acceptable if it fulfills either of the requirements. That is clearly not what is expected. Your interpretation is valid if you consider both the outcomes as one requirement and there wouldn't be any "if" in the statement in that case.
In the exam, you will even see a problem statement with three/four words, "What will happen?" or "What is the output?" followed by code. Would you sit there thinking whether it is asking about compilation or execution or something else? No, because the context of the question and the given options will tell you what it means.
But English is not my first language so, I will confirm it with someone else. You may also do so if that is the case with you too.
thank you for your feedback!
If you like our products and services, please help us by posting your review here
Users browsing this forum: No registered users and 2 guests