Topic;
Computer program
Definition;
“Computer is an electronic
machine. It is used to solve different kinds of problems according to the set
of instructions given to it. A set of instructions given to computer to perform
a particular task is called is called a computer program or software.”
Programming languages;
A programming language
provides the way of communication between user and computer. A computer program
is writing in programming languages. The programming language provides set of
rules for writing computer programs. The instaurations of the program are
written in a specific manner and according to the rules of the programming
language. There are many programming language. Each language has its own set of
rules to write computer programs.
History of programming language:
The first programming
language predate modern computer. At first the languages were codes. During a
nine-month period in 1842-1843 Ada lovelace
translated the memoire of Italian mathematician Luigi Menebrea about Charles Babbage’s
newest proposed machine, the analytical engine. With the article, she append a
set of notes which specified in complete details a method of calculating Bornoulli number with the engine,
recognized by some histories as the world first computer program.
The first program codes were
specialized for there application. In the first December of 20th century,
numerical calculations were based on decimal numbers. Eventually it was
realized that logic could be represent with numbers, not only with worlds, for
example Alonza Chuch was able to
express the lambda calculus in a formulae way.
The 1940s
in the 1940s, the first recognizably modern eclectically powered computers
were crated. The limited speed and memory capacity forced programmers to write
hand tuned assembly language programs. It was eventually realized that
programming in assembly language required a great deal of intellectual effort
and was error-prone.
I.
1943-plankalkul (Konrad Zuse,), designed, but
unimplemented for a half century
II.
1943-ENIAC
Electric Numerical integrator and computer. Machine-specific code set appearing
in 1948
III.
1949-1954 a
series of a machine-specific mnemonic instruction set like ENIAC’s beginning in 1949
with c-10 BINAC. Each code set, or instruction
set, was tailored to a specific manufactured.
The 1950 and 1960:
In the 1950s, the first three modern programming languages whose
descendants are still in widespread use todays were designed:
I.
FORTRAN
(1955), “FORmula
TRANslator”, invented by Jhon Baku
ser al.
II.
LISP(1958), the
“LISt processor”, invented by Jhon Mccharthy.
III.
COBL(1959), the
common Business oriented language created by the short Range committee, heavily influenced by Grace Hopper.
IV.
IAL-(1958),
international Algebraic Logic.
1964:
APL-A programming
language
This
language using for a mathematical notation, with lot of operator. A unique
type, the array. Define from 1957 to
1960, implemented in 1964.
1965:
Iswim-if
you see what I Mean by p.Landin.
First purely functional
language in the mathematical sense. The first to use LAZY EVEALUTION.
1970:
Pascal-Named from the French
mathematician Blaise Pasca by NIKLaus
Wirth.
1973:
C-c is the successor of B,
Which is the successor of BCPL by Dennis Ritchie.
1974:
Awk-
first letters of author’s name
Aho
Keminghan Weinber.
This is use for word
processing language based on a regular expression, using a pattern action
principle.
1981-1986:
C++. By
Bjarne stroustrup.
Types of programming languages
The programming languages
are divided into two main categories:
(i)
Low-level programming languages.
(ii)
High-level programming languages.
Low-level programming languages:
The programming languages
that are very close to machine language are called Low-level programming
languages. The program written in these languages are in binary form (0 or 1) and symbols. The examples of Low-level
programming languages are.
(i)
Machine language
(ii)
Assembly language
High-level programming languages:
The programming languages
that are very close to human languages are called High-level programming
languages. The program instructions are written according to the syntax of the
programming language. The examples of high-level programming languages are.
(i) C\C++
(ii) FORTRAN
(iii) COBOL
(iv) Java
(v) Pascal
(vi) BASIC
History of c-language
C is a general-purpose high-level
programming language. It was developed by (Dennis
Ritchie at AT&T Bell laboratories)
in 1972. It was derived from an
earlier programming language named B.B-language was developed by Ken Thompson in 1970. This language provided
the basis for the development of c. In the late seventies C began to replace the more familiar languages of that
time like PL/I, ALGOL, etc. No one
pushed C. Thus, without any advertisement C’s reputation spread and its pool of
users grew. Ritchie seems to have been rather surprised that so many
programmers preferred C to older languages like FORTRAN or PL/I, or the
newer ones like Pascal and APL. But,
that's what happened. Possibly why C seems so popular is because it is
reliable, simple and easy to use. Moreover, in an industry where newer
languages, tools and technologies emerge and vanish day in and day out, a
language that has survived for more than 3 decades has to be really good.
In the past, c-language was mainly used for writing
system. These system software were operating systems, compilers, utility
programs etc. the UNIX operating system and its tools were also written in c.
Advantages of C:
1. Easy
to learn
2. Easy
to detect errors
3. Machine
independent
4. Availability
of library functions
5. Shorter
programs
6. Well-defined
syntax and standard
7. Source
code is understandable by another programmers
The C Character Set:
A character denotes any alphabet, digit or special symbol
used to represent information. Figure shows the valid alphabets, numbers and
special symbols allowed in C.
Alphabets
|
A, B, ….., Y, Z
a, b, ……, y, z
|
Digits
|
0, 1, 2, 3, 4, 5, 6, 7, 8,
9
|
Special symbols
|
~ ‘ ! @ # % ^ & * ( ) _ - + = | \ { }
[ ] : ; " ' < > , . ? /
|
C Keywords:
Keywords are the words whose
meaning has already been explained to the C compiler (or in a broad sense to
the computer). The keywords cannot be used as variable names because if we do
so we are trying to assign a new meaning to the keyword, which is not allowed
by the computer. Some C compilers allow you to construct variable names that
exactly resemble the keywords. However, it would be safer not to mix up the
variable names and the keywords. The keywords are also called ‘Reserved words’.
There are only 32 keywords
available in C. these keywords given in figure.
auto
|
double
|
int
|
struct
|
|||
break
|
else
|
long
|
switch
|
|||
case
|
enum
|
register
|
typedef
|
|||
char
|
extern
|
return
|
union
|
|||
const
|
float
|
short
|
unsigned
|
|||
continue
|
for
|
signed
|
void
|
|||
default
|
goto
|
sizeof
|
volatile
|
|||
do
|
if
|
static
|
while
|
|||

No comments:
Post a Comment