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!”.

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

Java is a programming language made at Sun Microsystems by James Gosling, released in 1995. The most the of the syntax of the language is derived from C and c++. Java is object oriented programming language, it is based on the concept of classes and objects which is specifically designed to have as few implementation dependencies as possible. Java is one of the most popular language around the world and is widely used, specially for server-client web application. Sun Microsystems licensed most of its Java technologies under the General Public License(GNU). One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any hardware/operating-system platform. The extension of Java document is “.java”, so whenever you create a Java document you’ll need to save the document with this extension.

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

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

class HelloWorld
{
static public void main( String args[] )
{
System.out.println( “Hello World!” );                                       // Hello World in Java
}
}

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.java” to your home directory.
STEP 3: Compile it by typing “javac hello_world.java” in the terminal window like command prompt.
STEP 4: Now, Run (or execute) it by typing “java hello_world” in the terminal window.
STEP 5: Once execution is finished, you’ll see the output “Hello World!”.

How to create php file – Hello world php code file

PHP stands for Hypertext Preprocessor. PHP is a server side scripting language, it is being used for web development and creating dynamic web pages. PHP is an open source language, its one of the first server side scripting language which can be embedded into HTML documents, it means there is no need to call an external file to process data. The language was found in the year 1995 by Rasmus Lerdorf along with Andi Gutmans and Zeev Suraski. Today many famous scripts uses php like Joomla, WordPress, Drupal, MyBB and many more. PHP can be deployed as a standalone shell on most of the platform and operating system for free. PHP is competitor to Microsoft’s ASP .net. The extension of PHP document is “.php”, so whenever you create a PHP document you’ll need to save the document with this extension.

How-to-create-php-file-Hello-world-php-code-file

Below is Hello world php code and steps to create a php file:

<?php
echo ‘Hello World!’;                    // Hello World in PHP
?>

STEP 1: You just need to copy this code, paste it into text editor like notepad.
STEP 2:save as” with the name you want like “hello_world.php” to your desired location in your system.
STEP 3: Now just upload this sample php document to you php supported server, if you have one or you can install a server into you system to execute this php code and see the output.
STEP 4: Once you are done with it you’ll see the output “Hello World!”.