1. Home
  2. Computing & Technology
  3. C / C++ / C#

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

By , About.com Guide

3 of 5

Learn how to Enter a Program in C

Screenshot of Editor Screen
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.

Explore C / C++ / C#
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. C / C++ / C#
  4. C
  5. C Tutorials
  6. Enter the First Program

©2009 About.com, a part of The New York Times Company.

All rights reserved.