Starting from:

$30

CTA200 Assignment 1

CTA200  Assignment 1

The goal of this assignment is to practice using the command line and git. The material you need should
all be contained in the first lecture. You may work in groups, but please complete all the steps yourself and
submit your own repository.
1. Make a Github account and create a new (public) empty repository called “CTA200” (or something
of the sort).
2. Create a local repository. Add the Github repository as the remote.
3. Enter the folder for the local repository in your terminal. Using a text editor such as vi or gedit, create
a simple ‘README.md’ file and a ‘LICENSE’ which contains the MIT license (find this online and
copy/paste it).
4. Commit your changes to the local repository.
5. Copy the files ‘main.c’, ‘average.c’ and ‘average.h’ from the ‘assignment1 2020’ folder of the CTA200
course repository to your local repository.
6. Using a text editor, create a ‘Makefile’ which builds and links the C program. Check that you can run
the program and it produces the right result (you should be able to identify what it does from the code
without knowing any C).
7. Commit the Makefile and the .c and .h files to your local repository.
8. Push the changes from your local repository to Github.
9. (Bonus) Make a change to the C program and describe what you did in the comments (add at least 1
line somewhere). Commit the modified version with a useful commit message and push to your Github
repository.
10. Using the history command, save your command line history to a file called ‘history.txt’ to show how
you completed the tasks (hint: pipe the results of history to the tail command using the | operator to
choose how many of the last n lines to show, you can redirect the output to a file using the > operator).
11. Commit your history.txt file to the local repository and push the changes to Github.
When you have completed the assignment, send the url of your Github repository to Fergus (horrobin at
astro.utoronto.ca) and CC Norm (murray at cita.utoronto.ca) with “CTA200 Assignment 1” in the subject
line.
1