Page t002, go to NEXT, PREVIOUS, INDEX

Compile and Run a C Program


Consider the C program "t002.c"

      int main()
      {
        printf ("Hello, world!\n");
        return (0);
      }

Compile with command

      gcc t002.c

Run by command

      ./a.out

Should produce

      Hello, world!

C Course, 15-jan-1997, Peter Klok, pfk@hef.kun.nl