It's UWAweek 47

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 68 tagged articles
Showing 68 of 828 articles.
Currently 107 other people reading this forum.


 UWA week 38 (2nd semester, week 8) ↓
SVG not supported 2:25pm Wed 18th Sep, ANONYMOUS

hey just a quick clarification, does the arguments like arg0, arg1, ... also add towards the max 50 identifier count?


SVG not supported 2:23pm Mon 16th Sep, ANONYMOUS

ANONYMOUS wrote It does seem like this question is an issue with semantics ( which has happened before (https secure.csse.uwa.edu.au run help2002?p np opt U463 year 2019)) and being such a minute detail of the system call. It seems, at least, possi...


SVG not supported 1:21pm Mon 16th Sep, ANONYMOUS

ANONYMOUS wrote 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) All the other messages seem to be speculation, where the same argu...


SVG not supported 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 kno...


SVG not supported 11:58am Mon 16th Sep, ANONYMOUS

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 You also note that the question has similar phrasing to questions 8, 10, and 1...


SVG not supported 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 l...


 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported 4:16pm Fri 6th Sep, ANONYMOUS

well, not really sure about this either, but in my opinion it really comes down to technicality, since after the fork, the code doesn't terminate, so we can either call fork() again somewhere outside the function, or call the function more than one t...


SVG not supported 10:51am Fri 6th Sep, Chenjun H.

I'm not really sure, but I believe the answer is D because the fork() system call doesn't exist on Windows, which is why it isn't guaranteed to work.


SVG not supported 10:34am Fri 6th Sep, Amitava D.

I don't know what Chris had mind, it could be a trick question (note the 'always be true'). Suppose I write a complete C code with a main() and do not call this function?


SVG not supported 9:36am Fri 6th Sep, Etienne VH.

I don't understand why the answer to question 20 was D, rather than C, is anyone able to explain? Thank you ) (20) Consider the following C code void function(void) fork(); fork(); printf("hello world n"); If the above code ...


SVG not supported 2:00pm Thu 5th Sep, ANONYMOUS

it does the statements individually not at the same time


SVG not supported 1:55pm Thu 5th Sep, ANONYMOUS

Hello. Could someone explain why the answer to question 3 is A? Thanks


 UWA week 34 (2nd semester, week 5) ↓
SVG not supported 2:08pm Fri 23rd Aug, Tong L.

probably the day results are released, which is next Friday


SVG not supported 11:00am Fri 23rd Aug, ANONYMOUS

Hello. Just wondering when i can get the solutions for midterm exam. Thanks


SVG not supported 5:04pm Thu 22nd Aug, Christopher M.

define N 10; is not invalid syntax (it's for the preprocessor, not for the C compiler).


SVG not supported 4:05pm Thu 22nd Aug, ANONYMOUS

You can find this state in the diagram found in lecture 8, slide page 14, or alternatively here https teaching.csse.uwa.edu.au units CITS2002 lectures lecture08 14.html


SVG not supported 2:38pm Thu 22nd Aug, ANONYMOUS

(10) Consider the following code which contains a common error c define N 10; void function(void) A) char array N ; B) int x 2 N; C) for(int i 0 ; i N i) printf(" c n", array i ); Which of the follo...


SVG not supported 10:38am Thu 22nd Aug, Etienne VH.

I was also confused by this one. I understood that the suspend state was distinct from the ready state, and that when a processor in the ready state is moved into swap, it stops being in the ready state. I didn't see the ready suspend thing ...


SVG not supported 9:50pm Wed 21st Aug, ANONYMOUS

Hi, I was lost that why is waiting not a traditional process state.


SVG not supported 2:36pm Wed 21st Aug, Christopher M.

This is correct.


SVG not supported 2:34pm Wed 21st Aug, Christopher M.

ANONYMOUS wrote That's correct.


SVG not supported 2:21pm Wed 21st Aug, Christopher M.

ANONYMOUS wrote This is the correct reasoning.


SVG not supported 2:01pm Wed 21st Aug, ANONYMOUS

Not sure if I am correct but the reason why B (int x 2 10;;) is because it would take the second semicolon as an empty statement so it'll be read as int x 2 10; ; which would not affect the program itself but will just look weird and isn't good ...


SVG not supported 1:59pm Wed 21st Aug, ANONYMOUS

Not OP but would it be because it depends on the bits (i.e. 32-bit or 64-bit) where 32-bit is 4 bytes per integer but something like 16-bit will give 2 bits so it'll be value of 200. That's why the answer is B. Because the value byte of each object i...


SVG not supported 1:53pm Wed 21st Aug, Zhengxun L.

First, I think C is also right answer because the question asks for "reason",and option C is the "result" caused by the fail. Option D is correct because it presents a scenario that is not applicable to the fork() system call. Since fork() does not ac...


SVG not supported 1:51pm Wed 21st Aug, ANONYMOUS

Wouldn't this mean that A and B are incorrect. Since we define N as 10; which includes the semicolon. That means for A, Substitution char array 10; ; The semicolon causes a syntax error here. For B, int x 2 10;; This results in a double semico...


SVG not supported 12:03pm Wed 21st Aug, ANONYMOUS

(20) Which of the following is NOT a reason for the fork system call failing? A. the user already has too many processes running. B. The whole computer system has exhausted is available memory. C. the value returned by fork is -1. D. the parameter passed...


SVG not supported 8:15am Wed 21st Aug, Christopher M.

ANONYMOUS wrote Line A is not valid, and line C does not contain a syntax error. Cut-paste-compile the code if you need to.


SVG not supported 8:13am Wed 21st Aug, ANONYMOUS

How can the answer still be A when line A is valid and line C contains a syntax error?


SVG not supported 3:40am Wed 21st Aug, Christopher M.

ANONYMOUS wrote If the size of one integer was always 4 bytes, then the answer would be A) 400 bytes . The C11 standard (nor any C standard) does not specify sizeof(int) to always be 4. For what reasons might sizeof(int) not be 4?


SVG not supported 3:12am Wed 21st Aug, Christopher M.

ANONYMOUS wrote Definitely is a p9 - reload the PDF page in your browser (the old PDF is still in its cache).


SVG not supported 10:47pm Tue 20th Aug, ANONYMOUS

This is not the right answer bro, I'm 100 sure the answer of Q10 is C not A


SVG not supported 10:42pm Tue 20th Aug, ANONYMOUS

Here


SVG not supported 10:36pm Tue 20th Aug, ANONYMOUS

Where did you get the answers? There is still no page 9 in the sample test


SVG not supported 10:30pm Tue 20th Aug, ANONYMOUS

Hi Chris, I was lost with question 7, I thought the answer maybe A but it is B can you please explain. Thanks )


SVG not supported 8:32pm Tue 20th Aug, ANONYMOUS

Hi I have checked the practice test paper and there is no page 9 with solutions from the Mid-Semester test section. I am just wondering if it wasn't able to upload or it has been posted elsewhere? Regards,


SVG not supported 7:40pm Tue 20th Aug, Christopher M.

You may now find the solutions on the last page (p9) of the sample test. Good luck,


SVG not supported 7:40pm Tue 20th Aug, Christopher M.

ANONYMOUS wrote (indeed; it's still Tuesday) You may now find the solutions on the last page (p9) of the sample test. Good luck,


SVG not supported 4:30pm Tue 20th Aug, ANONYMOUS

Hi, I was just wondering where I could find the solutions to the practice test, as it is mentioned that they would be released today on the mid-semester test information page. Thanks in advance, Jerry


SVG not supported 8:52pm Mon 19th Aug, Wei H.

https www.uwaquiz.com you can enter this link and practice to get some clues on what to focus on and maybe focus on the lecture notes, I'm also glad to have some discussion and share tips together


SVG not supported 4:55pm Mon 19th Aug, Christopher M.

ANONYMOUS wrote It's certainly an error if you correctly perform the textual substitution for N . A couple of students have asked if this is a trick question - not really, misunderstandings about how the preprocessor works are reasonably common....


SVG not supported 4:55pm Mon 19th Aug, ANONYMOUS

N is replaced with "10;" - so the syntax becomes valid.. for(int i 0; i 10; i)


SVG not supported 4:52pm Mon 19th Aug, ANONYMOUS

Oh, I see, there's a semicolon after the N... oops. I'll be mindful of that in future. When you say both your points, are you saying that for(int i 0 ; i N i) is valid syntax? Or are you talking about the response above mine? Thanks for the res...


SVG not supported 4:37pm Mon 19th Aug, Christopher M.

ANONYMOUS wrote I'm afraid both of your points are incorrect. Please see https secure.csse.uwa.edu.au run help2002?p np opt B72


SVG not supported 4:31pm Mon 19th Aug, ANONYMOUS

Line A is valid; the syntax char array N ; declares an array named "array" and allocates enough memory for N-many chars to be stored in the array, (see here (https www.geeksforgeeks.org c-arrays )). There's definitely a syntax error in line C th...


SVG not supported 2:09pm Mon 19th Aug, ANONYMOUS

for line C, it is for(int i 0 ; i N i) ... seems the answer should be line A. But is it okay that it doesn't have a semicolon after i N?


SVG not supported 6:15am Mon 19th Aug, Christopher M.

ANONYMOUS wrote Not the "Extra reading" links, as they're to daily and weekly news, blog, and review sites. But the "Information resources" page will certainly assist. Lecture 3. The answer to this is not explicitly stated on a lecture slide, but readin...


SVG not supported 6:06am Mon 19th Aug, Christopher M.

The define preprocessor directive, when used as define pattern1 pattern2 , results in all later instances of pattern1 being replaced by pattern2 . In this example, N is not a variable, and is not being initialised, but ev...


SVG not supported 6:01am Mon 19th Aug, Christopher M.

ANONYMOUS wrote B) is certainly the correct answer. Yes, it's undoubtably defined in the (huge) standards document, but there is no requirement to read it to answer the question. We've highlighted that C is quite a small language by contemporary stan...


 UWA week 33 (2nd semester, week 4) ↓
SVG not supported 9:50pm Sun 18th Aug, ANONYMOUS

Hi, I was wondering if the extra reading links on the unit schedule would be help us better prepare for the test coming up this Friday? I've been having difficulty answering questions such as (17) Operating systems started supporting multiprogramming ...


SVG not supported 2:42pm Sun 18th Aug, Manas R.

N 10;


SVG not supported 2:37pm Sun 18th Aug, Manas R.

define N 10; being wrongly initialised, I think all of the above should be the correct answer, as it makes N 10, resulting in the error in other statements as well.


SVG not supported 2:20pm Sun 18th Aug, ANONYMOUS

in light of adding clarity to the question, would it be fair to deduct that The C11 standard defines 29 standard header files, covering essential functionalities required for C implementations, as explicitly listed in the ISO IEC 9899 2011 specificat...


SVG not supported 7:42am Sun 18th Aug, Christopher M.

ANONYMOUS wrote Not all assessed information comes from lecture slides, but you have been referred to information resources that introduce discuss the topic of the question. All of the questions in this sample test have been taken from past tests. It's...


SVG not supported 7:35am Sun 18th Aug, Christopher M.

What is your thinking on this question. What do you believe is the correct answer, and why?


SVG not supported 8:12pm Sat 17th Aug, Manas R.

Consider the following code which contains a common error define N 10; void function(void) A) char array N ; B) int x 2 N; C) for(int i 0 ; i N i) printf(" c n", array i ); Which of the following lines contains a syntax error? A. Line A. B. Line...


SVG not supported 6:32pm Sat 17th Aug, ANONYMOUS

this is a question in the past exam Roughly, how many standard header files are defined by the C11 standard A. 10 B. 30 C. 100 D. 300 was this information accessible on the lecture slides? and if so will these types of questions come out in the midsem? jus...


SVG not supported 5:42pm Sat 17th Aug, Christopher M.

I recommend that you review this statement.


SVG not supported 3:26pm Sat 17th Aug, Manas R.

The question is about the syntax error but initialising N has a syntax error itself. i.e. define N 10; Does option B, int x 2 N; , count as a syntax error?


SVG not supported 5:37am Thu 15th Aug, Christopher M.

This is the correct 'answer', thank you. I wonder how why the OP has break statements in the posted question. Perhaps they had been introduced by an IDE trying to be helpful by (incorrectly) anticipating what was coming 'next' ??


SVG not supported 7:23pm Wed 14th Aug, Chenjun H.

The code in the question doesn't have any breaks in the switch statement, remember that c has switch fall through by default, which should make the answer self evident.


SVG not supported 5:10pm Wed 14th Aug, Joshua N.

ANONYMOUS wrote You're right. I think there is a typo in the answer. None of the options are correct. However, there is one option that is very close to the correct answer. Can you see which one it is?


SVG not supported 4:59pm Wed 14th Aug, Joshua N.

ANONYMOUS wrote One place to the left means index - 1 . e.g. If an integer is at index 3 it will be at index 2 after the code runs. Likewise, if an integer is at index 1, then after the code runs it will be at index 0. I hope that makes sense.


SVG not supported 12:01pm Wed 14th Aug, ANONYMOUS

For the question 12 void function(void) for (int i 0; i 5; i) switch (i 3) case 0 printf(" i ", i); break; case 1 printf(" i ", i); break; ...


SVG not supported 10:04am Wed 14th Aug, ANONYMOUS

for this question in the sample test (14) Consider the following array declaration int arr 20 ; Which of the following code fragments moves all the integers in index positions 1 through 5 inclusive one place to the left to index positions 0 through 4 i...


SVG not supported 10:37am Tue 13th Aug, Christopher M.

Full details here https teaching.csse.uwa.edu.au units CITS2002 examinations.php The page also includes a link to a sample mid-semester test paper. Good luck,


SVG not supported 8:54am Tue 13th Aug, Christopher M.

You can find all details about the test here - https teaching.csse.uwa.edu.au units CITS2002 examinations.php A sample test paper coming later this morning.


SVG not supported 5:11pm Mon 12th Aug, ANONYMOUS

I just watched the lecture today and heard the mention of mid-sem exam with 20MCQ. I'd just like to ask what topics it will cover. Will it only be lectures or will it include workshops and labs (I saw one of the other help questions where it was ment...

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