You are here:About>Computing & Technology>C / C++ / C#> C> C Tutorials> Enter the First Program
About.comC / C++ / C#

C Tutorial - Lesson One Learning How to Compile With Open Watcom

From David Bolton,
Your Guide to C / C++ / C#.
FREE Newsletter. Sign Up Now!

Learn how to Enter a Program in C

Double click the example1.c filename we entered. This should open up the Watcom Editor. It's a fairly simple editor, feel free to use your own if you have another preference.

Now type in the following program.

#include <stdio.h>

int main() {
printf("Hello World") ;
return 0;
}

It's something of a tradition to output Hello World as the first program. Now save it by clicking the Save button or File on the menu then save. You can leave the editor open when compiling.

The text editor and the project windows are separate, so after changing the source code in the editor, you must save it before recompiling. It's slightly fiddler compared to newer IDEs like Visual Studio in the C++ and C# tutorials.

On the next page : Learn how to compile the application.

  1. Learning Open Watcom
  2. Typing Your First C Program
  3. Learn how to Enter a Program in C
  4. Compiling the Project
  5. Learn how to run Example One

<< Previous | Next >>

 All Topics | Email Article | Print this Page | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.