GCC Writing `hello world` - learnclang/1-helloworld GitHub Wiki

image

In a terminal, type the following.

$  nano hello.c

Now type the following source code.

#include <stdio.h>

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

Save the file

  1. Press Ctrl + X to exit nano
  2. Press Y to save the changes
  3. Press Enter, or enter a new file name and then press Enter.

[Next: Compilation ->](GCC Compilation)

⚠️ **GitHub.com Fallback** ⚠️