Assignment 0: Hello CS223!
Due Friday, January 21, before midnight
The goals for this assignment are:
Sign-up for Github
Look at the website
Write a simple C program
(Optional) Setup your development environment on your own machine
1. Try slack
I will be inviting you all to join the course slack channel. In the introduction channel, say and introduce yourself:
What is your preferred name and pronouns?
Share with us your favorite emojji. :)
We will use Slack for
Links to zoom and calend.ly
Questions and errata for assignments and labs
You can also use Slack to talk directly to me and the TAs, or even to each other!
2. Sign-up for Github
Please go to github.com and register. We will use github for assignments. Email the instructor (anormoyle at brynmawr.edu) with your github username.
We have made the decision to open-source our assignments and projects for this class. The benefit of this decision is that you will have a portfolio of work that you can easily keep and share.
Having open-source assignments means that your work is publicly viewable, should someone search for it. It also means that if you copy other people’s work, it is in plain view for anyone to see! We will compare assignments and expect everyone to adhere to the honor code at Bryn Mawr and Haverford.
You will discover that there are many open-source coding resources for online. Some of it is boiler plate and intended to be re-used, such as when we use API documentation in order to use a function. Any non-trivial code (longer than a single statement) that you re-use in your own program should be attributed. In this class, 99% of all code should be your own.
3. Read the class web pages
4. Hello C
Verify that you can use Github, git, and C. You can try this using a lab machine, or your own machine if you have setup your development environment there.
Fork the repository
Fork the repository from here:
Clone the repository
From your own account, clone the resitory you just forked. The URL should look something like the following
This will download a local account of the repository to your computer.
In the directory
A00, you will have a sample file,
hello.c and makefile
Makefile. Try building and running.
$ make hello $ ./hello Hello World
In the directory,
implement a new program,
hello.cto print a fortune of your choosing.
add a rule to the Makefile to compile your program to an executable named
Your program should compile and run like so:
$ make fortune $ ./fortune A journey of a thousand miles begins with a single step.
Submit your work
Add and check in your program using git and then push your changes to Github.
$ git status $ git add fortune.c Makefile $ git status $ git commit -m "assignment 0 exercise" $ git status $ git push $ git status
git status to check the result of the previous git command.
Check the Github website to make sure that your program uploaded correctly.
5. (Optional) Set up your own development environment
Having your own development environment will allow you to write code outside of lab.
|All programs must run on the lab’s Linux environment. Make sure you test your work on the lab machines if you work on your laptop!|
Once installed, you can setup your development environment from a bash shell.
wslto start the windows subsystem for linux. This will give your a bash prompt
Then install your development tools
sudo apt-get install cmake
sudo apt-get install git
sudo apt-get install g++
sudo apt-get install vim
sudo apt-get install libc6-dev-i386
sudo apt-get install gcc-multilib
sudo apt-get install hexedit
sudo apt-get install valgrind
sudo apt-get install gdb
For example, you get something like the following
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS C:\Users\alinen> wsl WSL alinen@Balthazar:~$ sudo apt-get install make etc
|A quick way to open powershell is to type <WindowsKey>-'Q' and type 'powershell'.|
From terminal, run command
You can follow the instructions here
Then, to install additional dependencies, execute the following commands form terminal
$ brew install vim $ brew install git $ brew install hexdump $ brew install cmake
|A quick way to open terminal is to use spotlight. From the keyboard, type the <cmd> and <spacebar>. Then type terminal at the popup edit field.|
gdb cannot be run natively on mac.