Create, Compile and Run the Hello World Program in C
C programs can be written in a very easy manner, follow the below two steps to create, compile and run the program.
1. Open a text editor, write the following "Hello World" program and save the file with .c extension i.e. HelloWorld.c
Hello World Program - HelloWorld.c
#include <stdio.h>
int main(int argc, const char * argv[])
{
printf("Hello World");
return 0;
}
2. Compile the c file (i.e. C program) using the command gcc -o HelloWorld HelloWorld.c and execute the compiled code using the command HelloWorld (i.e. name of the compiled file)