Saturday, 21 February 2015
Wednesday, 18 February 2015
Tuesday, 17 February 2015
Your first program in C++
I hope you have viewed my previous blogs about programming and translators.
Now we will start with a basic program of C++.This basic program will help you to print a simple statement.So,lets start programming.I recommend you to use Turbo C++ for simple programming.
1. #include<iostream.h>
2. #include<conio.h>
3. void main()
4.{
5. cout<<“Welcome to my blog”;
6. getch();
7. }
Output:
Welcome to my blog
Sunday, 15 February 2015
Translators in C++
Translator
A translator is a one that converts the instructions of a high level language program into the instructions of a low level language program.
Just take the example of ambassadors of different countries.They speak different languages but there is a translator who translate one language to another.In this way,they understand the sayings of each other.
In the same way,a computer cannot understand the instructions of high level language program.So it must be converted into machine language code by a translator so that a computer may understand it easily.
There are normally 3 types of translators in the world of programming:
1. Compiler :-
A compiler converts the instructions of a high level language program into machine code as a whole.It means that it display the errors after compiling the whole program.It is faster in execution than other translators.The disadvantage is that error is not found immediately.
2. Interpreter :-
An interpreter converts the instructions of a high level language program into machine code step by step. It means that it display the errors after compiling each line.The main advantage is that error is found immediately .The main disadvantage is that it is very slow in execution.
3. Assembler :-
An assembler converts the instructions of an assembly language into the instructions of a machine language.
Saturday, 14 February 2015
Introduction to Programming
The set of instructions given to computer to perform execution is known as a program and the process of writing the program is known as programming.
A person who develops the program is known as a programmer.
There are mainly two types of programming languages:
1. High level languages
2. Low level languages
The languages that are close to human language and far away from machine language are known as high level languages.e.g.,JAVA,C++,Fortran,etc.These languages are easily to understand for the users and difficult to understand for the computer.These languages are less closer to computer hardware than machine languages.
The languages that are close to machine language and far away from human language is known as low level languages.e.g., Machine language, Assembly language(Assembly language is also called middle-level language),etc.These languages are difficult to understand for the users and easier to understand for the machine.These languages are closer to computer hardware than high level languages.
Subscribe to:
Posts (Atom)