This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
In this lesson, you will create and run the basic “Hello World” program in C. You should be familiar with the “Hello World” program in Java, and it's very similar in C. The goal of the lesson is simply to make sure that your development environment is ready to go.
The choice of development envrionment is something of a religious issue among programmers. Some swear by one tool; others think that’s the worst thing ever. You basically have two choices. Either you use an “Integrated Development Environment” (IDE), or you use the command shell.
If you want to use an IDE, you have some choice depending on what platform you are developing on (and for). The main contenders are:
Unfortunately, installing and using any of these tools is beyond the scope of this tutorial. However if you want to use Eclipse for C development, check out our companion guide Eclipse for C Programming (in CSC173).
Using the command shell is something You Should Know if you are a Computer Science student. Unfortunately, you are on your own until we get around to writing a tutorial. But there are plenty of tutorials on the web. You should be able to find something that works for you. We also recommend the book The UNIX Programming Environment by Kerhighan and Pike. It is a classic and very readable. Try it!
Now on with the lesson...
hello.c
” (without the quotes).