Introduction To Algorithms
Introduction To Algorithms
Sequence of Steps:
1. Read a,b
2. Calculate c=a+b
3. Print “addition is” c
4. Exit
Introduction to Algorithms
Flowchart Notations
Flowchart
Ex: Draw a flowchart to find the largest no between two numbers A & B.
Ex: Draw a flowchart to find the largest of three numbers A, B, and C.
Programming Languages
A computer language is a means of communication between people and
the computer.
Types of programming languages or Categorization :
There are two major types of programming languages:
1.Low Level languages:
a)Machine Level languages
b)Assembly Language
6. Visual programming:
f) Visual Basic
g) Visual Java
h) Visual c++
Subprogram 1 Subprogram 2
Subprogram 2.1.1
Programming Paradigms (Styles)
1. Procedural Programming paradigm
2. Modular Programming paradigm
3. Functional and Declarative(Logic) Programming
paradigm
4. Object-Oriented Programming paradigm
Procedural Programming paradigm
Main program
Func 5()
Main()
{
-------
-------
-------
File 1()
-------
File 2()
--------
File3()
--------
}
Object 1
Object 2 Object 3
Object 4
Digits 0 to 9
Special + ,-, /, \, {}, [ ], = ,!, <, > ,“” ,$, &, >=, <=,
Symbol
etc
White space Space, Horizontal tab, Vertical tab,
Character
Newline
BASIC COMPUTER ENGINEERING PREPARED BY: MR. CHETAN GUPTA
Token
The smallest unit of a program is known as token
or lexical unit.
C ++ have following tokens:
1. Keywords
2. Identifier
3. Constant
4. Separators
5. operators
Features of c++:
1.Object oriented
2.Class
3.Data abstraction
4.Inheritance
5.Poltmorphism
6.Portability
7.Versatile
BASIC COMPUTER ENGINEERING PREPARED BY: MR. CHETAN GUPTA
Precedence & Associativity