GCC Writing `hello world` - learnclang/1-helloworld GitHub Wiki
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
- Press
Ctrl + X
to exitnano
- Press
Y
to save the changes - Press
Enter
, or enter a new file name and then pressEnter
.