What is check50?
check50
is a command-line program included in the CS50 Appliance with which you can check the correctness of (some of) your programs.
What is an ID?
Each program that is checkable with check50 has a unique ID that identifies it. You can find this ID in your pset specifications page. For example, the ID for hello - pset1 is 2014/x/pset1/hello
.
How to run check50?
The easiest to run check50
involves 2 main steps:
- To be within the directory where your program's source code file (the
.c
file).
- To know the ID for the program you want to check its correctness (included in the pset specifications page).
Assuming the .c
source code file for hello - pset1 exists in ~/Dropbox/pset1/hello
. And from the pset specification page, the ID for hello is 2014/x/pset1/hello
and the source code file is named hello.c
- Open up the terminal.
- Navigate your way to
~/Dropbox/pset1/hello
by executing cd ~/Dropbox/pset1/hello
.
- Execute the command
check50 2014/x/pset1/hello hello.c
.
Notice that we passed the file name (i.e., hello.c
) after the ID in
the command above.
Some psets require passing more than a single source code file. Please
follow the instructions in your pset specifications page!
How to know if my program is correct?
Assuming your program is correct, you should then see output like

where each green smiley means your program passed a check (i.e., test). You may also see a URL at the bottom of check50's output that contains more details.
If you instead see yellow or red smileys, it means your something is not correct! For instance, suppose you instead see the below.

Because check50
doesn’t think hello.c
exists, as per the red smiley, odds are you uploaded the wrong file or misnamed your file. The other smileys, meanwhile, are yellow because those checks are dependent on hello.c
existing, and so they weren’t even run.
Suppose instead you see the below.

Odds are, in this case, you printed something other than hello, world\n
, per the spec’s expectations. In particular, the above suggests you printed hello, world
, without a trailing newline (\n
). So, your output must exactly match the required output per the specifications page.
Does check50 record my scores in CS50's gradebook?
Know that check50
won’t actually record your scores in CS50’s gradebook. Rather, it lets you check your work’s correctness before you submit your work. Once you actually submit your work (per the directions at this spec’s end), CS50’s staff will use check50
to evaluate your work’s correctness officially.
What are other errors that check50 might give?
check50 might throw some errors when running it. For example, if you see an error like this
Checking....... server responded with status code 400. Try again later!
You should run the following command in the terminal and try again
update50
If you instead see an error like this
Checking.......... invalid ID
You should make sure your ID (e.g., 2014/x/pset1/hello
) is correct! Check the previous questions and answers for more information!