Beginners
If you are a beginner must read this basic details about the programming language.
Programming is a set of instructions it produces an output. we usually uses so many programming languages to run certain task. In the blog we discuss some of programming languages. So let's discuss some programming basics.
Programming is a set of instructions it produces an output. we usually uses so many programming languages to run certain task. In the blog we discuss some of programming languages. So let's discuss some programming basics.
C is a general-purpose programming language. Many compiler available to run C and C++. Here we use Turbo C to run these C programs. So you must download and install turbo C in your system.
How to run C program
1. Open Turbo C, type your code in a new window
2. Save the file as .c extension
3.Press alt+F9 to compile the code. If you don't find any error, you are ready to run the program
4. Press ‘Ctrl+F9’ to run the progam
Here is an example for C program to print a text.
void main()
{
printf(“C is a programming language”);
getch();
}
2. Save the file as .c extension
3.Press alt+F9 to compile the code. If you don't find any error, you are ready to run the program
4. Press ‘Ctrl+F9’ to run the progam
Here is an example for C program to print a text.
void main()
{
printf(“C is a programming language”);
getch();
}
2. JAVA
Java is high level object oriented programming language. Download and install JAVA JDK in your system. after installation go to the java installed file and copy the path of a bin folder and paste it into environment variable.
To get environment variable, simply search it in the start menu, set a new path and paste it then click save button.
Usually java programs write using text editors like notepad, notepad++ etc. then save as .java file extention.
To get environment variable, simply search it in the start menu, set a new path and paste it then click save button.
Usually java programs write using text editors like notepad, notepad++ etc. then save as .java file extention.
How to run Java
1. open command prompt(cmd),
2. Select the drive where java program is saved.
For example if you saved in drive D, type the code D:/ in the command prompt
3. type the following code to compile the java program
javac Programname.java
NOTE: Here 'Programname' is your class name in the java code, you can give any name for java class. And also notice the first letter must be in capital letter
If you find any errors, correct it.
4. After your compilation type the below mentioned code. Then you see the result.
1. open command prompt(cmd),
2. Select the drive where java program is saved.
For example if you saved in drive D, type the code D:/ in the command prompt
3. type the following code to compile the java program
javac Programname.java
NOTE: Here 'Programname' is your class name in the java code, you can give any name for java class. And also notice the first letter must be in capital letter
If you find any errors, correct it.
4. After your compilation type the below mentioned code. Then you see the result.
java Programname
Here is an example of java code
Here is an example of java code
class Classname
{
public static void main(String args[])
{
System.out.println("Hello Java");
}
}
click here to see various JAVA programs
we can write html code in any text editer. then save the file as .html. We dont need to install any other software to run html program.
Example for a HTML:-
<html>
<head>
<title>HTML Example<,/title>
</head>
<body>
<h1>this is a text on the webpage</h1>
</body>
</html>
Here <H1>tag is for to print a heading on a webpage. There are many other tags
We use PHP and HTML at the same time for creating web pages. Additionally we use javascript, css also for web developing. In this blog we have some examples of PHP programs.
Here, WAPP is used to run PHP code. and we also use Postgres sql as back end.
How to run PHP file
1. There are many IDEs available to write PHP. Here we simply use a text editor to type php code.
2. Save it as a.php extention
3. You must save the php file in the below mentioned location
C:\Bitnami\wappstack\apache2\htdocs\
4. After 3rd step. take any browser in your windows os and type localhost/filename.php in the URL.
Example to print a text using php code:-
<?php
print "Hello PHP";
?>
click here to see various PHP programs
click here to see various Android programs
How to run Shell Program
1. Open terminal
2. Move to the drive where the file is saved. (for eg: cd Desktop)
2. Make the file executable using the following code
chmod +x filename.sh
3. After the 3rd step type the following code to run shell program
./filename.sh
Example for Shell program to print a text:-
echo "this is a shell program"
3. HTML
HTML(Hypher Text Markup language) is a simple language to create web pages. HTML uses some tages for the creation of webapges like <html>, <body>, <head>, <title> etc.we can write html code in any text editer. then save the file as .html. We dont need to install any other software to run html program.
findyourprogram.blogspot.com/beginners |
<html>
<head>
<title>HTML Example<,/title>
</head>
<body>
<h1>this is a text on the webpage</h1>
</body>
</html>
Here <H1>tag is for to print a heading on a webpage. There are many other tags
click here to see various HTML programs
3. PHP
PHP is a server side scripting language. This is a widely used language for web developing.We use PHP and HTML at the same time for creating web pages. Additionally we use javascript, css also for web developing. In this blog we have some examples of PHP programs.
Here, WAPP is used to run PHP code. and we also use Postgres sql as back end.
How to run PHP file
1. There are many IDEs available to write PHP. Here we simply use a text editor to type php code.
2. Save it as a.php extention
3. You must save the php file in the below mentioned location
C:\Bitnami\wappstack\apache2\htdocs\
4. After 3rd step. take any browser in your windows os and type localhost/filename.php in the URL.
Example to print a text using php code:-
<?php
print "Hello PHP";
?>
click here to see various PHP programs
3. Android
In this blog, we use android studio to run android programs. We can write xml file and java file to create an android applications. xml creates the design of the applications. java file decides proper activities held inside the application. Before to run android, we want to create a virtual phone window in the android studio.click here to see various Android programs
findyourprogram.blogspot.com/beginners |
6. Shell
Shell is a program to designed to be run by the Linux. Shell program usually writes using text editor and run with terminal. Shell file must save as .sh extension.How to run Shell Program
1. Open terminal
2. Move to the drive where the file is saved. (for eg: cd Desktop)
2. Make the file executable using the following code
chmod +x filename.sh
3. After the 3rd step type the following code to run shell program
./filename.sh
Example for Shell program to print a text:-
echo "this is a shell program"
Python is a high-level programming language. Many IDE is available to run python code.
Here we use Python-IDLE to run python code. First we want to save the file as .py extension. Then the run button available in the IDLE menu.
example to python:-