You should work on this project individually.
In this project, you will clone a Git repository from Kit, add a simple C "Hello, World" program to it, test your program, and commit and push your changes back to Kit.
To start getting used to programming in C, read Chapter 1 of K & R through section 1.6 (you may also want to take a look at the first few sections of chapter 5).
Clone the HelloWorld Project:
In this course you will be submitting your programs to Kit as Git
repositories. This means that you need to start the assignment by cloning
an existing Kit repository for the assignment. (Find the assignment on
Kit, select Start, and then do a git clone repoName
of the provided repository name at the Unix/Linux command line on your
computer.) I recommend changing the name of the repository directory to a
name that identifies this project (HelloWorld
, for example),
although that isn't absolutely necessary.
The
Using Git to Get/Submit Code to/from Kit (or Watch Alyce
program Project 1a) video (13.5 min) covers all of this.
Note: The issues with the Turn In button have been fixed, so you
can ignore my comments about that in the last minute of
the video.
For some assignments, the starting repository will provide useful code you can use in your projects. This repository, though, contains nothing except some simple instructions in a Markdown file. You will need to create your C source file.
HelloWorld: In your new repository directory, create the "Hello World" program from Section 1.1 of K & R. (You can find and download a copy on the Example C files page.)
As specified in the syllabus, your program should adhere to the Kalamazoo College CS Program Style Guide and Documentation Standards, including use of the Braces Line Up style pattern. Use an editor such as VS Code to modify the "Hello World" program to include your name, the date, and a brief description of the program to the top of the file. Compile and run the program to test it.
If you want a written summary of the commands from the video above to compile a C program from the Unix/Linux command line, this document may help.
Submit the Project:
Add your source file (git add sourceFile.c
)
to the Git "staging area". (You need to do this
again whenever you modify a file, before committing it.) Commit your
changes, providing a short (1-line) description, e.g.,
git commit -m "Create Hello World program" OR git commit -m "Add comments to Hello World"
Then push your changes (git push
).
You can complete the edit/add/commit/push cycle repeatedly. In fact, pushing versions of your project while it is still under construction is a way to create backups of your work as you go.
"Turn In" the Project: When you're done, click on the Turn In button in Kit to signal that your project is ready to grade. (You can still edit/commit/push new changes after clicking on the Turn In button if you think of something you forgot earlier, but if the project has already been graded you will need to submit a Regrade Request in Kit to indicate that the project has been updated. Whether regrade requests are granted depends on the grader's workload and the significance of the project modifications.)