Do you have access to a computer lab with Windows machines? They'd probably have Visual Studio or Cygwin and GCC. In that case, just write your assignment on your Mac, then, before you hand it in, compile and test it on a lab machine.
When I took C courses in college, even though our assignments were simple command-line programs, we had to make sure they worked on Windows, Linux, and Solaris. It's always good to be safe--there are some extremely subtle cross-platform differences that could bite you in the, um, rear. 😛