C Language

INTRODUCTION TO LANGUAGE

Men communicate with one another in their native language and convey their ideas and emotions. The

computer should receive the data in a form that could be understood by the machine with easily. To

communicate with the computer we must need a language. All programming languages are classified into

two categories.

1. Machine oriented language (or) Low level language.
2. Problem oriented language (or) High level language.

LOW LEVEL LANGUAGES:

These languages are designed to give better machine efficiency. Low level language is a

combination of following two languages.

i. Assembly language.
ii. Machine language.

Machine Language:
The computer process data and other information only in machine language. A machine

language is a combination of only “0” and “1” which are called as “Binary Codes”. During the early stage

of the computer evolution, programs were prepared in machine language only. The ordinary user fined it

extremely difficult to write these instructions in Binary. Because it is very complicated.

Assembly Language:
To reduce the difficulties in preparing programs in the machine language a kind of

programming language known as assembly language was developed. In assembly language the instructions

are written in mnemonic codes. Assembly language is also varies from computer to computer. The

computer manufacturer supplies an assembler to translate the assembly language into the machine

language.

HIGH LEVEL LANGUAGES:
These languages are used to give better programming efficiency. A high level language consists

of set of characters, words and certain rules (Syntax Rules), which help in preparing programs to make

use of computer for processing data. Compiler or Interpreters are used to translate the high level

language into machine level language.

TRANSLATORS:
To writing in machine language is very difficult. So programs are written in Assembly language

or some high level languages such as C, C++, BASIC, COBOL, etc. programs developed to translate

programs in H.L.L. to machine code are called as Translators. Translators are basically three types.

Assembler:
The programs written in the Assembly language is translated into the machine language by the

translator programs known as Assembler.
Interpreter: These programs translate high level language programs into machine language for execution

line by line, stops execution until each error if any; if you rectified the error then remaining lines will be

executed. The detection and corrections takes more time.
Ex: BASIC, COBOL etc

Compiler:
These programs translate high level language programs into machine language for execution

total program at a time. It lists the errors available in a program. The compilation and execution of a

program through compilers, it takes less time compared with the Interpreter.
Ex: C, C++ etc


ALGORITHM
The algorithm has come to refer to a method that can be used by a computer for the solution of

a problem. This makes the algorithm different from words such as process, technique or method.
Definition
An algorithm is well defined, finite set of computational instructions that accomplishes a

particular task, which may not take inputs and produces some values or a set of values as output. The

algorithm is made up of a sequence of numbered steps. Each step is preceded by a brief comment

describing its function.




No comments:

Post a Comment

PHP Notes

The Characteristics of PHP:- ----------------------------------- 1.PHP is a high level programming language. 2.It is a server-side scrip...