The simplest hello world program you can write in C.

This is a very simple Hello World program that you can write in C.

int main (void) {

write (1, "Hello World\n", 14);

return 0;

Just compile the program like this:

[email protected] ~/Documents $ cc my.c -o hello

Then execute it to get the output. This is very easy.

[email protected] ~/Documents $ ./hello 
Hello World

I wonder if you could strip this program down even more and make it even simpler. An interesting exercise indeed.

No comments have been made. Use this form to start the conversation :)

Leave a Reply