From RootdevWiki
Hello World
The Hello World program in C:
Create the file hello.c as follows:
#include "stdio.h"
int main( int argc, char *argv[] )
{
printf( "Hello World\n" );
return(0);
}
Then compile it with GCC as follows:
gcc hello.c -o hello
There you go, you have just created your first C program.