It's UWAweek 5

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.

 Posts from 2022 will be available until after the Deferred and Supplementary Exams
22 articles posted by this ANONYMOUS person
Showing 22 of 919 articles.
Currently no other people reading this forum.


 UWA week 43 (2nd semester, study break) ↓
SVG not supported 4:08pm Fri 28th Oct, ANONYMOUS

Hi, I get confused with the theory aspects of the course. Could you please have a look at my answer to the question? I'm not sure if I am just missing the mark entirely for this question. Do you think you could release some solutions for the writing ...


SVG not supported 4:02pm Fri 28th Oct, ANONYMOUS

I'm also a bit confused about how exactly to write the function. I tried to write it (attached) but I am unsure how to return the exit status of an unsuccessful command. If we call execl() and it fails, does the child process just terminate completel...


SVG not supported 12:19pm Fri 28th Oct, ANONYMOUS

I was wondering if we're allowed to post our answers for the practice exams here to get feedback? For the code I've tried writing (attached), I just made an array using malloc(100000). In these kinds of questions, is it reasonable to just allocate a r...


SVG not supported 2:48pm Wed 26th Oct, ANONYMOUS

Hi there Is there any chance you could release the solutions for the practice exams? It's still useful without solutions, but I think seeing them would make checking our understanding easier


 UWA week 42 (2nd semester, week 12) ↓
SVG not supported 12:27pm Fri 21st Oct, ANONYMOUS

Hi Just wanted to follow up on this. My program sometimes has the error 'gzip tmp trove decompression OK, trailing garbage ignored' and sometimes doesn't. I have tried unlinking the file in various places but it doesn't seem to help. I can't find...


SVG not supported 5:08pm Thu 20th Oct, ANONYMOUS

I take this back - it is printing an error message 'gzip tmp trove decompression OK, trailing garbage ignored'. But I'm still confused about how to truncate and unlink the file. And also, when it needs to be done - like is it after calling execl(" ...


SVG not supported 5:01pm Thu 20th Oct, ANONYMOUS

Hi In a previous help forum post, you mentioned that we need to either truncate or unlink() our files. Is this during the gzip or the zcat process? I don't believe my program currently does either one, but it seems to work okay without any error messag...


SVG not supported 11:21am Thu 20th Oct, ANONYMOUS

Thank you, I think I understand it a bit more now. The gzip process will automatically read from standard input, which is fd 0. So then, gzip will give its output to standard output, which is fd 1. But I'm unsure how to translate this to a file. I...


SVG not supported 3:00pm Wed 19th Oct, ANONYMOUS

Hi I am confused how to implement gzip through pipes. I've watched the example in lecture 18 on October the 3rd, but I am still confused. 1. Is it correct that we should be writing the compressed file straight from our variables? As in, from our trove...


SVG not supported 2:51pm Wed 19th Oct, ANONYMOUS

Is it okay to keep information about the words from deleted files, as long as when our program reads back the trovefile, it knows that there is no relationship between that word and any files?


SVG not supported 2:41pm Wed 19th Oct, ANONYMOUS

Hi, I'm still a bit confused. Is my logic flawed because 1. I shouldn't use fread() on a 'non-text-like' file? 2. It's okay to use fread() to extract the contents of all files as an array of chars, but the problem is when I extract the words from the a...


SVG not supported 1:59pm Wed 19th Oct, ANONYMOUS

I am also confused about how to implement Gzip. From what I understand, gzip has the optional argument of a filename, but this is not what we should be doing right? (as in, we shouldn't be writing a file to disk and then calling gzip to make a compr...


SVG not supported 12:26pm Wed 19th Oct, ANONYMOUS

Hi Chris I have a read string from file functions which is not working for jpg files like . trove-sample-data dilbert-requirements.jpg. Instead of outputting the full string, it outputs something weird (see attached). I'm not sure if I can post my func...


 UWA week 41 (2nd semester, week 11) ↓
SVG not supported 10:48am Wed 12th Oct, ANONYMOUS

Hello I am trying to write a function that will extract the 'words' in a file and have come across some considerations. We don't know how long the words could potentially be when we first start traversing the file, so I'm wondering the most efficient ...


 UWA week 40 (2nd semester, week 10) ↓
SVG not supported 4:49pm Sun 9th Oct, ANONYMOUS

Hi, I am trying to write a function that will recursively traverse files and directories in a directory and collect the absolute path names of every file, and am having some issues. 1. I am basically just reusing the code from lecture 16 about directo...


SVG not supported 1:19pm Wed 5th Oct, ANONYMOUS

Also, when it says 'The contents of each named file should be indexed' and 'open each file found', what does this mean? Does it mean that if the file is a text file, then our program should open it and read all the words in the file and that's how i...


SVG not supported 1:09pm Wed 5th Oct, ANONYMOUS

Hi Chris, I'm trying to wrap my head around the project. I watched the sample solution video, but I think I become more confused. Could you please let me know whether my understanding of the project is correct? The first command invocation is . trove...


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported 8:36pm Sun 4th Sep, ANONYMOUS

Hi, I am wondering how we can debug our code on ubuntu (or any other easy way)? Thank you.


SVG not supported 2:56pm Thu 1st Sep, ANONYMOUS

When writing c programs (partially in regards to Project 1), if we know the functions we write are to manipulate global variables, is there a preference between 1. Writing more 'general' functions that takes parameters, which we then call in main and...


 UWA week 34 (2nd semester, week 5) ↓
SVG not supported 10:39am Sat 27th Aug, ANONYMOUS

I am a bit confused as to the "system's standard library (providing OS, C, and POSIX functions)." Would it be correct to say that all the header files we are allowed to include are contained in the following? https en.cppreference.com w c header http...


SVG not supported 4:57pm Fri 26th Aug, ANONYMOUS

Hi I'm thinking about how to do the project, and was hoping to get a bit of help before the weekend commences. Any guidance with the following is appreciated 1. I am thinking that we only want to read the Estimate file once and somehow store its val...


 UWA week 32 (2nd semester, week 3) ↓
SVG not supported 1:28pm Tue 9th Aug, ANONYMOUS

Hello I am attempting to do lab 2 and I am trying to work out the best ways to convert between different types. I can't seem to find a straight forward way to do it, so I'm wondering what the go-to ways are for the following 1. String Char to int (e....

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  2:26AM Jan 17 2023
Privacy policy