Thanks...I tried the

gcc prog.c -o prog.ex > somefile.txt

...and it created the file but the file was empty. I tried looking at their documentation too and I couldn't find anything either. I'm running this through Cygwin on my Win XP box.