This is an individual assignment. No partners. Submit your answers by email. Any clarifications and revisions to the assignment will be posted on the course help system.
Note: pages and exercise numbers below are for the 2nd edition of the text.
Create three files:
hw1.c
test_hw1.c
, that includes
a main()
function that does whatever testing you think you need
to do.The file hw1.c
should contain only the code neeede to implemet
the functions in hw1.h
. All testing and printing code should be in
test_hw1.c
In hw1.c
and test_hw1.c
,
be sure to #include "hw1.h"
. Never include
hw1.c
. Include's are only for header files.
Obey the rules on page 120. A lot is forbidden.
replace_byte()
-- an implicit cast is OK here
because this mixes an int
with unsigned
parameters.odd_ones()
float_le()
For Ex. 2.87, put your table entries in hw1.c
in a comment like this:
// Ex. 2.87 // // 1 01111 001 -9/8 1 01111 0010 -9/8 // 0 10110 011 ... ... ... // 1 00111 010 ... ... ... // 0 00000 111 ... ... ... // 1 11100 000 ... ... ... // 0 10111 100 ... ... ...
You can do your code development using any IDE you choose, but the compiler
underneath should be gcc
, since that's how it will be tested.
If it doesn't compile, I can't grade it.
hw1.c
.hw1.c
to c-riesbeck
in the grand domain of northwestern.edu
. Put
EECS 213 Homework H1
in the Subject line.