Sie sind auf Seite 1von 35

AN INTRODUCTION TO BASIC , COBOL , C , C++

, FORTRAN , PASCAL & JAVA


TWITTER
A N N M A T H E W , A N U E L I Z A B E T H , A J I T H J A C O B , A M A L K R ,
J O S H N E R J O H N Y , T H O M A S U K U T T Y A B R A H A M
BASIC means Beginners All-purpose Symbolic
Instruction Code.
It is an easy to use , friendly language.
Instruction resembles elementary algebraic
formulas.
Well suited for persons learning to program or first
time.



BASIC was originally developed by JOHN
KEMENY and THOMAS KURTZ.
Adopted by several commercial time sharing
services
Became the most widely used programming
language

HISTORY OF BASIC

A set of specific statements that you use with
proper syntax and ordering to produce a
program.
A BASIC program is a block of text that you
can read.
But for executing it on computer you should
take some steps.

STRUCTURE OF A BASIC PROGRAM

Steps are:

First you key in the program into the computer
Review the program for any syntax or logical errors
Save the program
Change it if required or
Run the program


Several commands called system commands make all of
these tasks possible. Some of the system commands are:
LIST
RUN
SAVE
NEW
CLEAR
LOAD
KILL


10 REM Program to display Hello World
20 PRINT Hello World
30 END

COBOL was developed in 1959 by a group called the
CODASYL (Conference on Data System Language)
committee.The member of this group committee are
drawn from the academia , user groups, Computer
manufacture , etc. The primary objective of this
committee was to provide a standard for a language
for every business for which the manufacturer will
develop compiler. The committee was organized by
the US Department of Defense.

Identification Division
Environmental Division
Data Division
Procedure Division
Structure Of a Cobal Program

01 IDENTIFICATION DIVISION
02 PROGRAM-ID. SAMPLE.
03 *
04 ENVIRONMENTAL DIVISION
05 CONFIGERATION SECTION
06 SOURCE-COMPUTER. IBM 3090
07 OBJECT-COMPUTER. IBM 3090
08 *
09 DATA DIVISION.
10 WORKING-STORAGE SECTION.
11 01 WS-VAR PICX(115).
*
PROCEDURE DIVISION
* This program displays Hello World.
MOVE Hello World TO WS-VAR.
DISPLAY WS-VAR
STOP RUN
INTRODUCTION TO C LANGUAGE

C is a programming language developed at AT & Ts
Bell Laboratories of USA in 1972. It was designed and
written by Dennis Ritchie. C is popular because it is
reliable, simple, and easy to use for the development of
Application and System software.


HISTORY OF C
The milestones in C's development as a language are
listed below:
UNIX developed c. 1969 -- DEC PDP-7 Assembly
Language
BCPL -- a user friendly OS providing powerful
development tools developed from BCPL.
A new language ``B'' a second attempt.
A totally new language ``C'' a successor to ``B''.
By 1973 UNIX OS almost totally written in ``C''.

C Programming

CHARACTERISTICS OF C
We briefly list some of C's characteristics that define the
language and also have lead to its popularity as a
programming language.
Small size
Extensive use of function calls
Structured language
Low level (Bitwise) programming readily available
Pointer implementation - extensive use of pointers for
memory, array, structures and functions.



#include<stdio.h>
main()
{
printf(Hello World);
}

OUTPUT

Hello World
Structure of C Program
Introduction to C++:
C++ is a programming language substantially
different from C. Many see C++ as C with some
addons .All different languages used now-a-days
comes under either Structured Programming (Eg:
ALGOL, Pascal and Modula-2) or Object Oriented
Programming Languages (Eg: C++, Java..,).


C++ was written by BJARNE STROUSTRUP (Bjar-ne
Strou-strup) at Bell Labs during 1983-1985.
C++ is an extension of C.
Prior to 1983, Bjarne Stroustrup added features to C and
formed what he called "C with Classes".
From C with Classes to C++: 1982 1985.
Release 2.0: 1985 1988
The Explosion in Interest and Use: 1987
Standardization : 1988

History

Difference between c and c++:
C++ is an extension of C language. This means that you cannot only
use the new features introduced with C++ but can also use the power
and efficiency of C language

DIFFERENCES
C++ is object oriented while C is function or procedure
oriented.
Object oriented programming paradigm is focused on
writing programs that are more readable and
maintainable.
C++ also helps the reuse of code by packaging a group of
similar objects or using the concept of component
programming model.



C++ helps thinking in a logical way by using the concept of real
world concepts of objects, inheritance and polymorphism.


On the other hand, functional and procedural programming focus
primarily on the actions and events, and the programming model
focuses on the logical assertions that trigger execution of program
code.

C does not provide a native Boolean type.

Although most good C code will follow this convention, in C++ it
is strictly enforced that all functions must be declared before they
are used. This code is valid in c, not in c++.

In C++, you are free to leave off the statement 'return 0;' at the end
of main; it will be provided automatically, but in C, you must
manually add it.




#include<iostream.h>
int main(void)
{
Cout<<Hello World<<endl;
return 0;
}
Structure of C++ Program
One of the oldest computer languages

created by John Backus and released in 1957
designed for scientific and engineering computations


Version history
FORTRAN 1957
FORTRAN II
FORTRAN IV
FORTRAN 66 (released as ANSI standard in 1966)
FORTRAN 77 (ANSI standard in 1977)
FORTRAN 90 (ANSI standard in 1990)
FORTRAN 95 (ANSI standard version)
FORTRAN 2003 (ANSI standard version)
Many different dialects produced by computer vendors
(Digital VAX Fortran, now Intel Fortran)
Large majority of existing engineering software is coded in
FORTRAN (various versions)

History

Building a FORTRAN Program
Libraries
Source Code Object Code
Executable
Code
FORTRAN
Program
FORTRAN
Compiler
Link with
Libraries
Executable
File
Execute
Program
Test & Debug
Program
Make Changes
in Source Code

Statement Format
PROGRAM MAIN
C COMMENTS ARE ALLOWED IF A C IS PLACED IN COLUMN #1
DIMENSION X(10)
READ(5,*) (X(I),I=1,10)
WRITE(6,1000) X
1000 FORMAT(1X,THIS IS A VERY LONG LINE OF TEXT TO SHOW
HOW TO CONTINUE
* THE STATEMENT TO A SECOND LINE,/,10F12.4)
1-5
Label
6
7-72 Statements 73-80
Optional
Line #s Any character: continuation line
Based on the punch card in use when Fortran was created

FORTRAN fixed format
C in column 1 indicates that line is a comment
columns 1-5 are reserved for statement labels
- statement labels are not required unless the statement is
the target of a goto
- labels are numeric values only
column 6 is the continuation flag
- any character in column 6, other than space or 0,
indicates that this line is a continuation of the previous line
- there is usually a limit of 19 on the number of continuations
columns 7-72 are contain Fortran statements
columns 73-80 is for sequence information
- only of any use when using punch cards

Statement Format

PROGRAM HELLO
This program prints out hello world
PRINT *,Hello World
END
PROGRAM
INTRODUCTION TO PASCAL
Procedural Programming Language
Developed by Prof. Niklaus Wirth
(Switzerland,1970s)
Named in honour to mathematician , Blaise Pascal
Most Popular: Turbo Pascal


Built in Data type
User defined Data type
Provides a defined set of Data Structures
Has a strong data typing element
Supports Structural Programming
Simplicity and Expressivity
Features Of Pascal

Program HelloWorld;
begin
wrilteln(Hello World);
end
Structure Of Pascal Program
Java is a programming language originally
developed by James Gosling at Sun
Microsystems (which has since merged into
Oracle Corporation) and released in 1995 as a
core component of Sun Microsystems


Java technology is a high-level programming and a
platform independent language. Java is designed to
work in the distributed environment on the Internet
Java has a features that provides you better "look and
feel" over the C++ language,
moreover it is easier to use than C++ and works on the
concept of object-oriented
Java enable us to play online games, video, audio, chat
with people around the world, Banking Application,
view 3D image and Shopping Cart. Java find its
extensive use in the intranet applications .



It should be "simple
It should execute with "high performance"
Object-oriented and familiar"
It should be secure

Primary Goals in the Creation of the Java language

Easy to Start
Easy to write code
Write better code
Write Once and Used in any Java Platform
Distribute software makes work easy
ADVANTAGES OF JAVA


// java program to display Hello world
Class SayHello
{
public static void main(String args[])
{
System. Out. Println (Hello world);
}
}


Program

Das könnte Ihnen auch gefallen