C is a compiled language, so once you compile the code, it will output an executable that unless specified by -o [executable-name]
, will be called a.out
. Your hello world program should look like this:
#include <stdio.h>
int main() {
printf("hello, world\n");
}
Don't forget the closing bracket at the end. To compile this code, make sure you have GCC installed and run gcc [program-file-name].c
, and replace the second argument with the name of the C file. Once the code is compiled, you can see that a file named a.out
has appeared in your current directory. You can then run ./a.out
to run the program.
I'm assuming your system comes with GCC, but if it doesn't, there are many resources on Google to help, including https://gcc.gnu.org/install/.