Sale!

(Computer Science 2211a) ASSIGNMENT 1

$30.00

Category:
5/5 - (3 votes)

Software Tools and Systems Programming
(Computer Science 2211a)
ASSIGNMENT 1

Assignment overview
We would like students to get experience with Unix basics, C compilation, and assignment
submission process.
For questions 1. 2. And 3., please complete these in any word processor, but convert your final
paper to a .pdf ( Portable Document Format ).
Label this document as yourUserName_asn1.pdf
(see the end of this document for a detailed explanation of yourUserName).
1. Answer the following questions.
a. What is an operating system?
b. What is a kernel of an operating system?
c. What is a shell in Unix?
2. Answer the following questions. For this question, we assume that you are in directory
∼/tmp/cs2211a/Asn/asn1. You should create directories along the path if they do not exist. In this
directory, create two directories, dir0 and dir1, and two files, df0 and df1. In dir0 create a file dir0.
In dir1 create a file df1.
a. What command do you use to create a directory?
b. What command do you use to create a file?
3. Answer the following questions for the use of ls command. And then demonstrate your answers
by typing the appropriate commands and capture the screen with script command assuming that
you are in directory ∼/tmp/cs2211a/Asn/asn1. For this question, please use /usr/bin/ls in
compute.gaul.csd.uwo.ca.
a. What is the result of command ls dir0 dir1 df0 df1?
b. What ls option(s) should we use if we want to display permission information?
c. What option(s) should we add to ls dir0 dir1 to display permission information of dir0 and
dir1 but not their contents?
d. Compare the results of commands ls and ls . , are the results different and why
4. Create your first program using the C language.
In your work area create a sub directory off of CS2211 and label this new directory: assignments
Change to your new directory labeled assignments and create a sub directory and label this: asn1
Change to this new directory (asn1) and using a Unix editor (i.e. vi or vim) create a new file.
You are to write a C program that will output the exact following to the screen:
Hello World!
Save this file and name it: yourUserName_asn1.c
(see the end of this document for a detailed explanation of yourUserName).
NEXT: Follow the steps below to complete Part 4.
1. Type the following to begin recording your session in a file called ans1.output
script YourUserName_Asn1.output
note – (using your actual user name).
2. Display the current date and time using the appropriate command
3. Display your username using the appropriate command
4. Display the contents of the current working directory using the ‘l’ switch (lower case L).
5. Display the contents of the file yourUserName_asn1.c (i.e. show the C program)
6. Compile the program again ensuring the executable is labeled: asn1
7. Run the program.
8. Type exit to stop your screen capture session.
9. Copy (i.e. using an FTP or any method of your choice) the two files listed below to your computer so
you can upload them through OWL for submission.
YourUserName_asn1.c
YourUserName_Asn1.output

Submission Instructions:
Required Coding Standards
All code is to be indented correctly.
Comments at the very beginning (top – first lines) of each of the C code files must be:
/* CS2211a 2021 */
/* Assignment 01 */
/* your name */
/* your student number */
/* your UWO User Name */
/* Date Completed */
Your program is to be submitted as C code file.
Your script will be a script file created in UNIX.
Your document file will be a Portable Document File (.pdf)
Submit via the CS2211 OWL Web Site the following three files in OWL:
YourUserName_asn1.pdf
YourUserName_asn1.c
YourUserName_Asn1.output
(yourUserName – example: assume my UWO email is kdoit373@uwo.ca
i.e. if my email is – kdoit373@uwo.ca then my user name will be – kdoit373
So, my UWO User Name is: kdoit373 and this assignment is asn1
therefore, one of the file names that is to be used for submission is:
kdoit373_asn1.c
It is the student’s responsibility to ensure the work was submitted and posted in OWL.
OWL replies with a summation verification email (every time).
Any assignment not submitted correctly will not be graded.
PS: remember: do your own work – you will need to know all this for the exam to pass !!!!
Please check CS2211 Assignment Submission Guidelines.
2

Scroll to Top