beginner at C: Need help compiling/linking with gcc

Please make sure that you have read our rules. And note:
(5) Search the forums database with your keywords before asking.

Please learn how to find and examine our FAQ section. From our home page go to Answers to Frequently Asked Questions.
In the FAQ section is an article [thread=13774] Unix Tutorials/Programming Tutorials/Shell Scripting Tutorials[/thread] with a link to a tutorial that will answer your question.