Homework 0
Caution
  • You are expected to work individually.
  • Due: Friday, January 31st by 11pm (Baltimore time).
  • This assignment is worth 20 points.

Learning Objectives

Objectives
  • editing a C source file,
  • compiling and executing a C program.

Tools/technologies:

  • git
  • zip up multiple files
  • transferring files from ugrad to a local machine using scp/pscp
  • submitting to Gradescope.

Part 1

Caution

You should receive an invitation to the jhu-ip organization and your private repository by Firday, Jan 24. If you filled out exercise 1 form and yet haven't received the invite, post privately for all instructors on Piazza.

In your private git repository (created for you on Github under jhu-ip organization), create a new folder named homework, then a subfolder named hw0. In that hw0 subfolder, create three separate C source files with names given below that output exactly the messages shown below. In each case, the desired output message should be followed by a newline (“\n”) character.

The name and behavior of each program is as follows:

file name desired output
gold.c Simone Biles wins Gold in Women’s All-Round Gymnastics!
silver.c The Silver in the 10m air pistol mixed team event goes to Yuysuf Dikec and Sevval Ilayda Tarhan.
bronze.c US Men’s Volleyball Team wins the Bronze medal at the Paris 2024 Olympics.

At the top of each source file, add two comment lines that provide your anonymous Hopkins ID (the random 6 characters code) and the current date:

// J3V6G9
// Jan 27, 2025

Compile and execute each of the three programs and ensure that they give the output exactly as shown. Finally, add all three source files to your git repository, commit them with an appropriate message, and push.

Tip

The "hello, world" program that was the starting point for Exercise 3-B could be a useful starting point for the source files for this homework.

Part 2

Create a text file named gitlog.txt which demonstrates your recent git activity by typing the command git log > gitlog.txt

Tip

You can optionally view the contents of the newly created file by typing less gitlog.txt

Part 3

Create a .zip file named hw0.zip which contains exactly the following four files: gold.c, silver.c, bronze.c, gitlog.txt. Copy the hw0.zip file to your local machine, and submit it via Gradescope. Specifically:

When you submit, Gradescope conducts a series of automatic tests. These tests do basic things like check that you submitted the right files and that your .c files compile properly. If you see error messages here (look for red), address them and resubmit.

Tip

You may re-submit any number of times prior to the deadline; only your latest submission will be graded.

Two notes regarding automatic checks for programming assignments:

Style & Grading

We do not have super strict style checks in this course, but you should be following best practices for readable code. For this first simple assignment that means good spacing, consistent indentation and bracket placements, and lines no longer than 80 characters.

Some points in our grading scheme will be for style and submission, including correct file names and the remainder will be for functionality. Code that does not compile will receive a 0 grade.