Compiling C Program

Create a new file called helloworld.c:

#include <stdio.h>
int main()
{
    printf("Hello World!\n");
}

Then run

$ cc helloworld.c -o helloworld

followed by

$ ./helloworld
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License