This information is essential for the course staff to effectively help you with debugging.
In this assignment, you will write code that interacts with the Unix filesystem and something called shell environment variables.
We made a video explaining some of the background information about Unix and the terminal that may be helpful for this assignment. Here's an example to reinforce the discussion from the video: You may optionally specify a third argument which is the size of the buffer to pass when tokenizing.
If you do not include this command line argument, the buffer is sized to always have enough space to store the entire token. It is also integrated with sanitycheck for your convenience.
For this reason, if you have debugging questions during office hours, you should make sure to gather information and explore the issue on your own first, and fill out the Queue Status questions with this information.
C String Assignment
For instance, if your program is failing in certain cases, find a small replicable test case where the program fails; then, use GDB/Valgrind to narrow down to what function/code block/etc.
Assignment by Julie Zelenski, with modifications by Nick Troccoli This assignment delves into those topics covered in recent string lectures and the second lab. This is an especially appropriate way to be introduced to C and Unix; not only does it continue a thread you began in assign0, but implementing the Unix operating system and its command-line tools were what motivated the creation of the C language in the first place!
Implementing these programs is a very natural use of C, and you'll see how comfortably it fits in this role.
The function strcpy copies the string from one location to another (and it copies the trailing 0 as well).
To join two strings together you use the strcat function, it modifies the first string by copying the second string over the 0 character.