It's UWAweek 38 (2nd semester, week 8)

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying the 5 articles in this topic
Showing 5 of 477 articles.
Currently 45 other people reading this forum.


 UWA week 38 (2nd semester, week 8) ↓
SVG not supported

Login to reply

👍?
helpful
10:44am Mon 16th Sep, ANONYMOUS

Making a new thread about this because I think it's worth getting to the bottom of the issue.

Question 20 is either an unexplained trick question or a mistake in the sample answers. I'd like to explain why I think it is, or should be treated as, the latter.

I'll start by addressing the two points of contention mentioned in this thread:

Suppose I write a complete C code with a main() and do not call this function?

The fork() system call doesn't exist on Windows, which is why it isn't guaranteed to work.

The question reads as follows:

If the above code executes successfully, which of the following statements will always be true?

It opens with a condition: that the above code 1) executes, and 2) executes successfully. This means that the first point - what if I don't call the function - is invalid, because the condition asserts that the code executes, which means the function must have been called. It also means that the second point - what if fork() doesn't work - is invalid, because then the code would not have "executed successfully", and hence the question would not apply. I should also add, as was noted in the tutorial on Fri 13th, it uses similar phrasing to various other questions (8, 10, 13).

Now I'd like to draw attention to a quote from Prof. Datta:

I don't know what Chris had mind, it could be a trick question

This is an admission that he (the current Unit Coordinator) cannot explain why the answer is what was given. In the absence of an explanation from the original test setter, I think the question should either be nullified or have (C) considered to be the correct answer. It does not make any sense for the question to remain as it is when the vast majority - including the UC - believe it to be at best misleading (at worst incorrect), with a clear alternate answer accepted as de facto correct.

Furthermore, there is already ample precedent for Prof. Datta changing parts of the unit to fit his teaching style. To be clear, I'm not critical of that in principle, but if there is any contention around overriding Dr. McDonald's UC decisions, that ship has clearly already sailed.

Unless someone can produce a counter example - where the code both executes successfully and does not "output "hello world" exactly four times, on four separate lines" - I think it's clear that the supplied answer is, or should be considered to be, incorrect. If the UC cannot defend a decision, then he can and should change it.


SVG not supported

Login to reply

👍?
helpful
11:58am Mon 16th Sep, ANONYMOUS

After going through multiple years of forums, I believe I found an answer to this specific question here: [help2002] You also note that the question has similar phrasing to questions 8, 10, and 13 - this is not entirely true, as those questions specifically mention that the code is a function and question 20 just calls it "C code" (which is only a slight distinction, but still somewhat relevant).


SVG not supported

Login to reply

👍?
helpful
12:23pm Mon 16th Sep, ANONYMOUS

Feel the same way. Why to create such ambiguity in the description of the question? This cannot verify whether we have mastered the knowledge. On the contrary, such tricks make me more confused and increase the difficulty of mastering the correct knowledge. I hope that Dr Amitava won't use this kind of word-game style questions in the final exam.


SVG not supported

Login to reply

👍?
helpful
1:21pm Mon 16th Sep, ANONYMOUS

ANONYMOUS wrote:

After going through multiple years of forums, I believe I found an answer to this specific question here: https://secure.csse.uwa.edu.au/run/help2002?p=np&opt=U215&year=2019

Thanks for the link. However, unless I'm misinterpreting it, that thread ended unresolved too. Dr. McDonald's only contribution in that thread was a non-answer (below):

Will it? In all cases? There are no trick questions in the tests.

All the other messages seem to be speculation, where the same arguments are made (what if fork() doesn't work). As far as I can tell, the only new information from that thread is that Dr. McDonald doesn't view it as a trick question. While it is interesting that it means it's not a mistake, he doesn't elaborate on it at all or provide any indication about what the question is supposed to be testing, so my point still stands that there is no available explanation.

You also note that the question has similar phrasing to questions 8, 10, and 13 - this is not entirely true, as those questions specifically mention that the code is a function and question 20 just calls it "C code" (which is only a slight distinction, but still somewhat relevant).

I'm not sure how meaningful this distinction is. The "code" that is talked about being executed is the function body. There is no other code in the question. Perhaps the argument could be made in a language like Python, the "code" could be "executed" in the sense that it is processed by the interpreter but the function is not necessarily called, but in C this is handled at compile time so it doesn't really apply. I think it's an uncontroversial statement that any reasonable reader would expect "the code executes successfully" to mean "the code in the body of the function executes successfully".


SVG not supported

Login to reply

👍?
helpful
2:23pm Mon 16th Sep, ANONYMOUS

ANONYMOUS wrote:

ANONYMOUS wrote:

After going through multiple years of forums, I believe I found an answer to this specific question here: https://secure.csse.uwa.edu.au/run/help2002?p=np&opt=U215&year=2019

Thanks for the link. However, unless I'm misinterpreting it, that thread ended unresolved too. Dr. McDonald's only contribution in that thread was a non-answer (below):

Will it? In all cases? There are no trick questions in the tests.

All the other messages seem to be speculation, where the same arguments are made (what if fork() doesn't work). As far as I can tell, the only new information from that thread is that Dr. McDonald doesn't view it as a trick question. While it is interesting that it means it's not a mistake, he doesn't elaborate on it at all or provide any indication about what the question is supposed to be testing, so my point still stands that there is no available explanation.

It does seem like this question is an issue with semantics (which has happened before) and being such a minute detail of the system call. It seems, at least, possible that by "successfully executes" it just means that it doesn't have any run-time errors, but I am not sure why that would be the case either. There is also another thread I found here but this is still rather vague.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy