How to create c program file – Hello world c program code file

C programming language is a language designed for general purpose by Dennis Ritchie between 1969 to 1973. C is a procedural language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory. C language is the most widely used language. There are many languages that were found after C, most of them are originated using C or with help of its features for e.g. C#, Java, PHP, Perl, Phython and many more. The extension of c program document is “.c”, so whenever you create a c program document you’ll need to save the document with this extension.

How-to-create-c-program-file-Hello-world-c-program-code-file

Below is Hello world c program code and steps to create c program file:

#include<stdio.h>
main()
{
printf(“Hello World”);
}

STEP 1: Copy the above code, paste it into text editor like notepad.
STEP 2:save as” the document with the name you want like “hello_world.c” to your home directory.
STEP 3: Compile it by typing “gcc –Wall hello_world.c” in the terminal window like “command prompt”.
STEP 4: Now, Run (or execute) it by typing “hello_world” in the terminal window.
STEP 5: Once execution is finished, you’ll see the output “Hello World!”.