SlideShare a Scribd company logo
C-PROGRAMMING &
DATA STRUCTURES
(21A050302)
J.MADHURI
CSE DEPARTMENT
C-PROGRAMMING & DATA STRUCTURES
(21A050302)
Unit-I:
 Computer Fundamentals, Algorithm, Flowchart.
 Introduction to C Language: Characteristics, Identifiers, Constants, Data types, Keywords, Basic I/O
statements, Structure of a C program.
 Operators and Expressions: Operators classification, Assignment operator, Arithmetic operators,
Relational and Logical operators, Increment and decrement operators, Conditional operator, Bitwise
operators, Operator precedence and associativity, Type casting.
 Statements: Simple and compound statements, Control statements – Selection, Loop and Branch
control statements.
Definition of Computer
COMPUTER :
Computer is an electronic device that takes data as input from input devices,
processes the instructions, and produces information as output on output
devices.
DATA PROCESS INFORMATION
Definition of Computer
Difference Between Electrical and Electronic Devices
 electrical devices convert the electrical energy into the other form of
energy like heat, light, sound, etc.
 electronic device controls the flow of electrons for performing the particular
task.
 Electronics deals with circuit boards and small components resistors, capacitors,
transistors and so forth.
INPUT PROCESSING OUTPUT
STORAGE
GENERATIONS OF COMPUTER
 In computer language”GENERATION “ is a set of technologies provide a frame of growth in technology.
 First generation:1942-1955(duration)
Vaccume tube(technology)
 Second generation:1955 – 1964 (Duration)
Transistor(technology)
 Third generation:1965-1975
IC chip
 Fourth generation:1975-1989
Microprocessor chip
 Fifth generation:1989-present
VLSI Microprocessor chip
ANATOMY / FUNTIONAL PARTS / BLOCK DIAGRAM
OF A COMPUTER
1. Computer Hardware
2. Computer Software
SECONDARY STORAGE DEVICES
CONTROLL
UNIT
ALU
MEMORY UNIT
INPUT
DEVICES
OUTPUT
DEVICES
RAM ROM
Central processing unit
Controll flow
Data flow
Computer Hardware :-
components which are visible and touchable are called as Hardware.
There are different types of Hardware components.
Some of them are input devices, output devices , processing devices,
memory devices ,...etc.
18
1. Input devices :-
Input devices are used to store the data into
the computer.
They are different types of input devices .
some of them are keyboard ,mouse
,scanner, microphone .
A)keyboard:-
keyboard is used to enter some textual data
into the computer.
A keyboard contains different types of
keys.
some of them are Alpha numerical
( alphabet and digits), special symbols, functional keys(F1
to F12).
B)Mouse :-
Mouse is an input device that allows users to select elements on the
screen.
Generally a Mouse contains left button, right button and a wheel
between two buttons.
Left button is used to select an element.
Right button specifies different operations that can perform on a
element.
Wheel is used to scroll the screen
C)Scanner :-
scanner is used to store textual data and images into computer
understandable format called " digitalized images ".
By using the digitalized images data can be transferred very fastly
from one computer to another computer by using internet .
D)Microphone :-
microphone is used to store data into the computer in the form of
audible format. microphone converts sound signals into electrical
signals .
C)Scanner :-
scanner is used to store textual data and images into computer
understandable format called " digitalized images ".
By using the digitalized images data can be transferred very fastly
from one computer to another computer by using internet .
D)Microphone :-
microphone is used to store data into the computer in the form of
audible format. microphone converts sound signals into electrical
signals .
22
2. Output devices :-
output devices are used to display the output of a computer after
performing the process .
They are different types of output devices some of them are
a)Monitor
b) Printer.
c) Projector
d) Speakers
e) Plotters
a)Monitor :-
Monitor user to display the output of the computer within
itself.
Generally these are called as visible display unit (or) video
display unit.
There are different types of monitors. Some of them are:-
1. CRT: - cathode ray tube.
2. LCD: - liquid crystal display
3. LED: - light emitting diode.
b)Printer's:-
printer are used to display the output of a computer on to
the paper.
There are different types of printers. Some of them are
1. Dot matrix printers
2. Inkjet printers
3. Laser printers
c)projectors :-
projectors are used to display the output of a computer
on to a screen or on to a wall.
d)speakers:-
speaker are used to view the output of a computer in the
form of a audible format. They are used to convert
electrical signals into sound signals.
e)plotters :-
plotters are used to display the output of a computer in
the form of Banner or Flex.
Note:
The output of a computer can be either in the form of
audible or visible. It depends upon the output device used.
26
3.processing devices :-
processing devices are used to process the given
data.
CPU is one of the important processing devices.
CPU:- ( processor or microprocessor or computer processor ) :-
The full form of CPU is central processing unit .
A processor is an integrated circuit made up of silicon
which are mounted on a small square plastic stable
surrounded by metal pins.
CPU contains different types of flow control units. Some
of them are:-
1. ALU (Arithmetical and logical unit)
2. CU (control unit)
3. RU (register unit)
1. ALU:-
The full form of ALU is arithmetical and logical unit.
All the arithmetic operations
(Addition,subtraction,multiplication,Division and remainder) and
comparison operations are performed under ALU.
2.CU:-
The full form of CU is control unit . It controls the flow of execution
within a system.
Flow of execution means verifying whether the data is transferring
from one location to another location .
In generally data will be transferred from:-
 Memory to input and output devices.
 ALU to registers, ... etc.
3. RU:-
The full form of RU is register unit. It is used
to store data temporarily.
RU executes the data very fastly.
There will be a limited number of registers
within a computer.
Some of the registers are:-
1. Instruction Counter
2.Program Counter
1.Instruction Counter:- it stores the address
of the present instruction.
2. Program Counter:- it stores the address
of the next instruction to be executed.
Memory Unit:-
Memory unit is used to store data into the computer.
Memory unit is an ordered collection of sequence of memory cells.
Each memory cell can store one byte of information “one byte = 8
bits”.
A bit is information represented with either “1 (or) 0”.
Different types of memory sizes are:-
Memory Unit:-
Memory unit is used to store data into the computer.
Memory unit is an ordered collection of sequence of memory cells.
Each memory cell can store one byte of information “one byte = 8
bits”.
A bit is information represented with either “1 (or) 0”.
Different types of memory sizes are:-
TERM ABBREVIATION MEMORY SIZE VALUE
Byte B 8 Bits
Kilo Byte KB 1024 B(210)
Mega Byte MB 1024 KB(210)
Giga Byte GB 1024 MB(210)
Tera Byte TB 1024 GB(210)
Peta Byte PB 1024 TB(210)
Exa Byte EB 1024 PB(210)
Memory is mainly classified into two types those are:-
 Primary memory
 Secondary memory
Primary Memory(or)Main Memory:-
Primary memory is used to store data , programs and results.
Primary memory is mainly classified into two types .Those are
a) RAM b) ROM
a)RAM:-
The fullform of RAM is Random Access Memory . It stores data
temporarily.
Read and Write operations can be performed on RAM. RAM is also
called volatile Memory (Data will be deleted when switch off the
systems).
b)ROM:-
The fullform of ROM is Read Only Memory .
It stores data permanently.
Only Read operations can be performed on ROM.
ROM is also called non-volatile Memory (Data will be exist even we
switch off the systems).
DISADVANTAGES:-
 Only small amount of data can be stored.
 Cost is very high.
Secondary Memory:-
secondary storage devices are used to store the large amount of data
permanently with low cost.
Some of the examples of secondary storage devices are:-
HDD(Hard Disc Drive)
Pendrive
CD(Compact Disc)
DVD(Digital Video Disc)
Floppy Disc
Computer Software: -
Collection of programs is called as software.
Program:- A program is a set of instructions which completes a
specific task.
Computer software is mainly classified into four types. Those are:-
1. Operating system (or) system software
2. Application software
3. Software Packages
4. Software utilities
1. Operating system (or) system software:-
operating system contains collection of programmes which are used
interact with the hardware components.
Some of the examples are DOS, Windows, Linux,.etc.
Some of the responsibilities of the Operating system are:-
1.Managing the memory allocation.
2.Collecting input from the input devices.
3.Writing data to the secondary storage devices...etc.
2. Application software:-
Application software contains collection of programs which are
to complete a specific task some of the examples of application
software are web browsers, computer games, .etc
3.Software packages:-
software packages contains the collection of programs which are
used to complete a particular task .some of the software packages
are Word processor ,DBMS,……etc.
4.Software utilities:-
software utilities contains collection of programs which are used to
protect our computer. Antivirus and Firewalls are used to protect
computer. Some of the examples are Norton, MacAfee,……etc.
40 Central Processing Unit
Memory Unit
Arithmetic Logic Unit
Control Unit
Register Unit
Input
Devices
Output
Devices
ROM RAM
41
Advantages of computers:
1. High speed
2. Accuracy
3. Storage
4. Diligence
5. Versatile
Programming Languages
A program is a set of logically related
instructions that are placed in a sequence
solve a problem using the computer.
To write a computer program there are
different types of programming languages.
Programming languages are mainly
into 2 types. Those are
1.Low Level Languages (LLL)
2. High Level Languages (HLL)
PROGRAMMING LANGUAGES
 As a programmer when we required to interact with a computer we need a communication channel
called programming language.
COMMUNICATION CHANNEL
PL BINARY
PROGRAMME
R
COMPUTER
BINAR
Y
PROGRAMME
R
TRANSLATOR COMPUTER SOFTWARE
USER
A)Low Level Languages (LLL) :-
Machine level language and assembly level languages are called as
low level languages.
Machine Level Languages:-
In Machine level language instructions of a program are written by
using machine codes.
1 (or) 0 are called as machine codes.
Machine language is also called as binary language. Because,
instructions are written using binary digits (1 (or) 0).
”1” represents “on” and “0” represents “off”.
Machine language is considered as first generation language.
 Example:1001 0001 0010 1100
 0010 1111 0101 0011
45
ADVANTAGES:-
1.It makes fast and efficient use of computer.
2. No translator is required to execute the
program.
DIS-ADVANTAGES:-
1. Difficult to remember all the operations.
2. All memory addresses have to be remembered.
ASSEMBLY LEVEL LANGUAGE:-
In Assembly level language instructions of
the program are written using mnemonic codes.
A mnemonic code means using simple English
words.
Some of the examples are ADD, SUB ,MUL ,DIV
,MOVE,…...etc
Example: DATA SEGMENT
- - -
- - -
DATA ENDS
CODE SEGMENT
- - -
- - -
MOV AX, N1
MOV BX, N2
ADD AX, BX
- - -
- - -
CODE ENDS
Assembly level language can be considered as second generation
language.
ADVANTAGES:-
1. Easy to understand when compared to machine language.
2. Errors can easily detected and removed.
DIS-ADVANTAGES:-
1. Assembly level language program are machine dependent program.
2. Programming is difficult and time consuming.
B)High Level Languages (HLL) :-
High-level languages programs are formed with the combination of
simple English sentences.
High-level languages are easier to design programs compared to
machine language and assembly language.
High-level languages are also called third generation languages (3GL).
Examples:
Pascal, FORTRAN, COBOL, C, C++, Java etc.,
Advantages:
Readability
Portability
Easy debugging
Ease in the development of software
High-level languages are further classified into 3different types such
as:
1.Procedural languages
2. Structured programming languages
3. Object-oriented languages
 a) Procedural languages:

Program is divided into number of procedures and data can be moved from
one place to another place.
Examples: FORTRAN, BASIC, COBOL etc.,
b) Structured programming languages:
Program is divided into number of functions and data can be moved
from one function to another function.
User-defined functions are introduced.
 Examples: PASCAL, C etc.,
 c) Object-oriented languages:
 Program is divided into number of objects.
 Objects can communicate with each other through functions.
 Data can be accessed only by the specified object.
 Data security constraints are added.
 Examples: C++ , JAVA etc.,
ADVANTAGES:-
1. Programs written in HLL are more reliable than assembly level
and machine level language.
2. Portability – HLL programs can execute on different machines with
or no modifications.
3. Errors can easily detect and corrected.
DIS-ADVANTAGES:-
Translators are required to convert the program from one language
another language .
52
TRANSLATORS
A translator is a program that converts the
given programming language from one type to
machine codes and vice-versa. The process of
conversion is known as Compilation.
(Source program) (Object Program)
53
Different types of translators are:
Assembler
Compiler
Interpreter
54
Assembler
It is a translator used to convert the
assembly language programs into machine code
and vice versa.
Assembly
Language
Program
Assembler
Machine
Language
Program
(Source program) (Object Program)
55
Compiler
It is a translator used to convert
the high-level language programs into
machine code and vice-versa.
High-level
Language
Program
Compiler
Machine
Language
Program
(Source program) (Object Program)
56
Interpreter
It is also used as a translator for high-
level language programs. It accepts source
program line by line and translates it into
machine language, which is immediately
executed.
High-level
Language
Program
Interpreter
loaded
system
Results
Data
57
ALGORITHMS
An algorithm is a step-by-step
procedure of solving the given problem
statement.
In general, algorithms are designed by
using pseudo code.
Pseudo code is a language
independent code.
58
Algorithms may be represented in
4 different ways. Those are:
1.Step-form
2.Pseudo-code
3.Flowchart
4.Nassi-Shneiderman Diagram
Step form :-
In Step form representation the normal language is used to represent
the statements.
Pseudo code:-
It uses vocabulary to define the statements of an algorithm.
Flow Chart:-
It uses specific symbols to represent each statement.
NASSI SCHNELDERMANN:-
It uses specific symbols to represent each statement.
All algorithms must satisfy the
following 5 characteristics.
1.Input
2.Output
3.Definiteness
4.Finiteness
5. Effectiveness
Input:-
Values required to execute the statements of an algorithm are called as
input.
Zero (or) more values required to solve the problem.
Output:-
The values that are obtained after execution of statements of an
algorithm are called as output.
Atleast one value will come as output.
Finiteness: -
The algorithm must terminates after some finite sequence of steps.
Definiteness:-
Each statement of an algorithm must be in a clear format.
Ex:- 1. Add 10 to y (Clear format)
2. Add 10 (or) 20 to y (not in a clear format)
Effectiveness: -
Each statement is must be in simple basic format.
63
Basic rules followed while designing
algorithms are:
1. Each algorithm will be logically enclosed between two
statements i.e start and stop.
2. To accept data from the user input (or) read statement is
used.
3. To display data as output. Write (or) print statements are
used.
4. “ ““(Left arrow) mark is used to assign a value to a
variable.
5. +, -, *, /, % are used to perform arithmetic operations on
two values.
6. AND, OR, NOT are used for conjunction, disjunction,
negative operations.
64
Example:
Algorithm for addition of given two values using
step-form representation.
Step 1: START
Step 2: Read two input values as x and y
Step 3: Add x and y values and store the
result value in z
Step 4: Print addition result value as z
Step 5: STOP
65
Algorithm for addition of given two values
using pseudo-code representation.
Step 1: START
Step 2: INPUT x , y
Step 3: z ← x + y
Step 4: PRINT z
Step 5: STOP
66
ALGORITHM TYPES
In general, the steps in an algorithm can be
divided into three basic categories as:
1. Sequence algorithm
2. Selection algorithm
3. Iteration algorithm
a) Sequence algorithm:
A sequence algorithm is a series of
steps in sequential order without any
break.
Instructions are executed from top to
67
Example:
Write an algorithm to perform Average of
three numbers
Step 1: START
Step 2: Read 3 values as A,B and C
Step 3: AVERAGE ← ( (A+B+C) / 3 )
Step 4: PRINT AVERAGE
Step 5: STOP
68
2. Selection algorithm
Steps of an algorithm are designed by selecting
appropriate condition checking is called as selection
algorithms.
Selection algorithms are designed using selection
control statements such as IF, IF-ELSE, Nested IF-ELSE,
ELSE-IF and SWITCH statements.
69
Example: Write an algorithm to whether a
person is eligible to vote or not.
1) Start
2) Read age value
3) If (age >= 18)
3.1) write “ eligible to vote”
Else
3.2) write age is not eligible to vote
4) Stop
70
c) Iteration algorithm:
Steps of an algorithm are designed
based on certain conditions and repeatedly
processed the same statements until the
specified condition becomes false is called
as iteration algorithms.
Iteration algorithms are designed using
iterative control statements such as WHILE,
D0-WHILE and FOR statements.
71
Example:Algorithm for sum of individual digits of
given number
Step 1: START
Step 2: INPUT n value
Step 3: sum ← 0
Step 4: Repeat WHILE n > 0
k ← n MOD 10
sum ← sum+ k
n ← n / 10
End Repeat
Step 5: PRINT sum
Step 6: STOP
72
FLOWCHARTS
Pictorial / Graphical / Diagrammatic
representation of an algorithm is called as a
flowchart.
Flowcharts are usually drawn using standard
symbols.
73
START / STOP STATEMENETS
The symbol used to represent START /
STOP statements is “Oval”.
Symbol:
Example: STOP
START
74
INPUT / OUTPUT STATEMENETS
The symbol used to represent input
statements and output statements is
“Parallelogram”.
Symbol:
Example: INPUT x,y
values
PRINT z
value
75
FLOW LINE STATEMENETS
The symbol used to represent data
flow from one place to another place is
“Arrow”. Arrow symbols are also used to
connect every two symbols in the flowchart.
Symbol:
76
Example:
START
STOP
READ x value
PRINT x value
77
PROCESS STATEMENETS
The symbol used to represent processing
instructions is “Rectangle”. Assignment
statements and calculation statements are placed
inside the rectangle symbol.
Symbol:
Example: Z ← X + Y
78
CONNECTOR STATEMENET
The symbol used to connect every two
parts of the program flow is “Circle”.
Symbol:
Example: START
A
A
STOP
79
DECISION MAKING STATEMENET
The symbol used for representing decision
parts of the program is “Diamond/Rhombus”.
Symbol:
Example:
80
Additional symbols used for designing complex flowcharts are:
SYMBOL
DESCRIPTION
DATA BASE
SUB ROUTINE
MULTIDOCUMENTS
IDEL OR WAITING STATE
EXTRACTS INDIVIDUAL SETS OF DATA
ITEMS
MERGE
81
Example: Draw a flowchart to find reverse of a given value.
82
Program Development Steps:
The main important phases while
developing a Program are:
1. Analysis
2. Algorithm & Flowchart
3. Program Design
4. Compilation
5. Program Execution
6. Testing & Validation
83
1. Analysis:
Analysis phase is also referred as
specification requirement analysis.
In this phase, analyze the given
problem to determine the input
requirements and the expected output.
84
Example:
Problem Statement :
Addition of given two values
Input requirements : Two numbers as x and y
Expected output : Addition Value of x and y
85
2. Algorithm & Flowchart:
Solution of the given problem
statement is represented in terms of a step-
by-step procedure is known as an
algorithm.
The steps of the algorithm is
represented in the form of a pictorial
representation is called as a flowchart.
86
Example:
Algorithm for addition of given two values
Step 1: START
Step 2: INPUT two values as x , y
Step 3: z ← x + y
Step 4: PRINT z value
Step 5: STOP
87
Example:
Flowchart for addition of given two values.
START
INPUT x,y values
z ← x + y
PRINT z
value
STOP
88
3. Program Design:
The flowchart and algorithm steps
developed in the previous phase is
converted into actual programs by
selecting any programming languages
like C, C++ etc.,
89
Example:
Program for addition of given two values in C language
#include<stdio.h>
#include<conio.h>
main()
{
int x,y,sum;
clrscr();
printf(“nEnter Two Numbers =”);
scanf(“%d%d”,&x,&y);
sum = x+y;
printf(“n Addition Result = %d”,sum);
}
90
4. Compilation:
The process of converting the source
program from one language to machine
language is called as compilation process.
Typing and syntax errors are found at
the time of compilation process.
91
Example:
In C language, the above program is
compiled by pressing either
F9
(or)
Alt F9 keys
92
5. Program Execution:
In this phase, it may arise two types of
problems such as
Run-time errors and
Logical errors.
93
Run-Time Errors:
These errors may occur during the
execution of the programs even though the
program is successfully compiled. The most
common types of run time errors are:
Example:
Divide-By-Zero,
Array-Out-Of-Bounds etc.,
94
Logical Errors:
These errors may occur due to incorrect
usage of the instructions in the program.
These errors are neither detected during
compilation or execution nor cause any
stoppage to the program execution.
95
Example:
In C language, the above program is
executed by pressing
ctrl F9 keys
96
6. Testing & Validation:
In this phase, the program is tested by
submitting proper input values. And then
program is validated with different valid
inputs.
97
Example:
Input :
Enter Two Numbers =
10
20
Output:
Addition Result = 30
98
SOFTWARE DEVELOPMENT METHOD
Modern projects are built using a series
of interrelated phases commonly referred as
the Software Development Life Cycle
(SDLC).
It is also called as Software Development
Process.
Software Development Life Cycle (SDLC):
 Following are the most important and popular SDLC models followed in
the industry −
 Waterfall Model
 Iterative Model
 Spiral Model
 V-Model
 Big Bang Model
100
The main important phases in software
development method are:
1. Requirement gathering & Analysis
2. System Design
3. Implementation (or) Coding
4. Testing
5. Deployment
6. Maintenance
Requirement gathering and
analysis:
 Requirements are gathered in this phase
 In this phase project managers and stack holders are
involved
 Meeting with managers, stake holders and users are
held in order to determine the requirements
· who is going to use the system
· how will they use the system
· what data should be input into the program
 After gathering requirements these requirements are
analyzed. Finally a requirement specification
is created, which serves guideline for the next
phase .
Requirement gathering and analysis:
Example:
Problem Statement : Addition of given two values
Input requirements : Read two numbers as A and B
Expected output : Addition Value as A+B
System design:
The following points should be consider in this phase:
1. What are the hardware components required to solve the problem.
2. Which type of programming language should be used to develop the
programs.
3. System Architecture is prepared.
4. Algorithms & flowcharts are prepared.
System design:
Algorithm:
 Solution of the given problem statement is represented interms of a step-by-step
procedure is known as an algorithm.
Flowchart:
 The steps of the algorithm is represented in the form of a pictorial representation
is called as a flowchart.
Algorithm:
 Step 1: START
 Step 2: READ A, B
 Step 3: sum ← A + B
 Step 4: WRITE sum
 Step 5: STOP
Flow Chart
Coding/Implementation:
The flowchart and algorithm steps developed in the previous phase is
converted into actual programs by selecting any programming languages
like C, C++ etc.,
This is the longest phase in software development method.
Program Design
(Code/Implementation):
Example: Program for addition of given two values in C
language.
#inlcude<stdio.h>
#include<conio.h>
main()
{
int x,y,sum;
clrscr();
pritnf(“nEnter Two Numbers:”);
scanf(“%d%d”,&A,&B);
sum = A+B;
printf(“nTotal:%d”,sum);
}
Testing & Validation:
 Verifying the software working according to user requirements (or)
not is called as testing.
 During this phase unit testing, integration testing, system testing
and acceptance testing are done.
 In this phase, the program is tested by submitting proper input
values.
 And then program is validated with different valid inputs.
Example:
Input : Enter Two numbers : 10 20
Output : Total : 30
Deploment:
After completing the testing process the developed product delivered to
the customer is called deployment.
Maintenance: when the customer starts using the developed system then the
actual problems comes up and needs to be solved from time to time. This
process whose take care by the developed product is known as
110
THE END

More Related Content

Similar to CPDS FUNDAMENTALS.pptx

Ch.01_Introduction_ to_computers.pdf
Ch.01_Introduction_ to_computers.pdfCh.01_Introduction_ to_computers.pdf
Ch.01_Introduction_ to_computers.pdf
saurabhChandbodhale
 
Ch.01_Introduction_ to_computers.pdf
Ch.01_Introduction_ to_computers.pdfCh.01_Introduction_ to_computers.pdf
Ch.01_Introduction_ to_computers.pdf
MewledMohammed
 
Computer Organisation
Computer OrganisationComputer Organisation
Computer Organisation
LaxmiDevi38
 
Computer system, devices and peripherals
Computer system, devices and peripheralsComputer system, devices and peripherals
Computer system, devices and peripherals
Allan Roloma
 
Computer Based Presentation.pptx
Computer Based Presentation.pptxComputer Based Presentation.pptx
Computer Based Presentation.pptx
ShivamYadav362790
 
Ch.01 introduction to_computers
Ch.01 introduction  to_computersCh.01 introduction  to_computers
Ch.01 introduction to_computers
ejistcaloocan
 
Digital Literacy Material for I BA/BCOM/BSC II-Sem Students
Digital Literacy Material for I BA/BCOM/BSC  II-Sem StudentsDigital Literacy Material for I BA/BCOM/BSC  II-Sem Students
Digital Literacy Material for I BA/BCOM/BSC II-Sem Students
BSatyaSai
 
Introduction to Computer System-ppt-converted.pptx
Introduction to Computer System-ppt-converted.pptxIntroduction to Computer System-ppt-converted.pptx
Introduction to Computer System-ppt-converted.pptx
ShivanjaliChaurasia1
 
Introduction to computer according to veta curicullum
Introduction to computer according to veta curicullumIntroduction to computer according to veta curicullum
Introduction to computer according to veta curicullum
Steven Alphonce
 
Introduction to computer hardware
Introduction to computer hardwareIntroduction to computer hardware
Introduction to computer hardware
K. A. M Lutfullah
 
Computer basics and i.o devices
Computer basics and i.o devicesComputer basics and i.o devices
Computer basics and i.o deviceskitturashmikittu
 
Random 120507151041-phpapp02
Random 120507151041-phpapp02Random 120507151041-phpapp02
Random 120507151041-phpapp02Yazeed Khalid
 
Computer System
Computer SystemComputer System
Computer Systemhajjaz
 
CSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System UnitCSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System Unit
Yhal Htet Aung
 
mix topic.pptx
mix topic.pptxmix topic.pptx
mix topic.pptx
rekhaaarohan
 
COA-Unit-1-Basics.ppt
COA-Unit-1-Basics.pptCOA-Unit-1-Basics.ppt
COA-Unit-1-Basics.ppt
Ruhul Amin
 
Power point presantation
Power point presantationPower point presantation
Power point presantation
Lerato Matibidi
 
Itc lecture
Itc lectureItc lecture
Computer Short Note1.docx
Computer Short Note1.docxComputer Short Note1.docx
Computer Short Note1.docx
SamyaGufoor
 

Similar to CPDS FUNDAMENTALS.pptx (20)

Ch.01_Introduction_ to_computers.pdf
Ch.01_Introduction_ to_computers.pdfCh.01_Introduction_ to_computers.pdf
Ch.01_Introduction_ to_computers.pdf
 
Ch.01_Introduction_ to_computers.pdf
Ch.01_Introduction_ to_computers.pdfCh.01_Introduction_ to_computers.pdf
Ch.01_Introduction_ to_computers.pdf
 
Computer Organisation
Computer OrganisationComputer Organisation
Computer Organisation
 
Computer system, devices and peripherals
Computer system, devices and peripheralsComputer system, devices and peripherals
Computer system, devices and peripherals
 
Computer Based Presentation.pptx
Computer Based Presentation.pptxComputer Based Presentation.pptx
Computer Based Presentation.pptx
 
Ch.01 introduction to_computers
Ch.01 introduction  to_computersCh.01 introduction  to_computers
Ch.01 introduction to_computers
 
Digital Literacy Material for I BA/BCOM/BSC II-Sem Students
Digital Literacy Material for I BA/BCOM/BSC  II-Sem StudentsDigital Literacy Material for I BA/BCOM/BSC  II-Sem Students
Digital Literacy Material for I BA/BCOM/BSC II-Sem Students
 
Introduction to Computer System-ppt-converted.pptx
Introduction to Computer System-ppt-converted.pptxIntroduction to Computer System-ppt-converted.pptx
Introduction to Computer System-ppt-converted.pptx
 
Introduction to computer according to veta curicullum
Introduction to computer according to veta curicullumIntroduction to computer according to veta curicullum
Introduction to computer according to veta curicullum
 
Introduction to computer hardware
Introduction to computer hardwareIntroduction to computer hardware
Introduction to computer hardware
 
Computer basics and i.o devices
Computer basics and i.o devicesComputer basics and i.o devices
Computer basics and i.o devices
 
Random 120507151041-phpapp02
Random 120507151041-phpapp02Random 120507151041-phpapp02
Random 120507151041-phpapp02
 
Computer System
Computer SystemComputer System
Computer System
 
CSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System UnitCSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System Unit
 
mix topic.pptx
mix topic.pptxmix topic.pptx
mix topic.pptx
 
Fg a
Fg aFg a
Fg a
 
COA-Unit-1-Basics.ppt
COA-Unit-1-Basics.pptCOA-Unit-1-Basics.ppt
COA-Unit-1-Basics.ppt
 
Power point presantation
Power point presantationPower point presantation
Power point presantation
 
Itc lecture
Itc lectureItc lecture
Itc lecture
 
Computer Short Note1.docx
Computer Short Note1.docxComputer Short Note1.docx
Computer Short Note1.docx
 

Recently uploaded

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 

Recently uploaded (20)

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 

CPDS FUNDAMENTALS.pptx

  • 2. C-PROGRAMMING & DATA STRUCTURES (21A050302) Unit-I:  Computer Fundamentals, Algorithm, Flowchart.  Introduction to C Language: Characteristics, Identifiers, Constants, Data types, Keywords, Basic I/O statements, Structure of a C program.  Operators and Expressions: Operators classification, Assignment operator, Arithmetic operators, Relational and Logical operators, Increment and decrement operators, Conditional operator, Bitwise operators, Operator precedence and associativity, Type casting.  Statements: Simple and compound statements, Control statements – Selection, Loop and Branch control statements.
  • 3. Definition of Computer COMPUTER : Computer is an electronic device that takes data as input from input devices, processes the instructions, and produces information as output on output devices. DATA PROCESS INFORMATION
  • 4. Definition of Computer Difference Between Electrical and Electronic Devices  electrical devices convert the electrical energy into the other form of energy like heat, light, sound, etc.  electronic device controls the flow of electrons for performing the particular task.  Electronics deals with circuit boards and small components resistors, capacitors, transistors and so forth.
  • 6. GENERATIONS OF COMPUTER  In computer language”GENERATION “ is a set of technologies provide a frame of growth in technology.  First generation:1942-1955(duration) Vaccume tube(technology)  Second generation:1955 – 1964 (Duration) Transistor(technology)  Third generation:1965-1975 IC chip  Fourth generation:1975-1989 Microprocessor chip  Fifth generation:1989-present VLSI Microprocessor chip
  • 7. ANATOMY / FUNTIONAL PARTS / BLOCK DIAGRAM OF A COMPUTER 1. Computer Hardware 2. Computer Software
  • 8. SECONDARY STORAGE DEVICES CONTROLL UNIT ALU MEMORY UNIT INPUT DEVICES OUTPUT DEVICES RAM ROM Central processing unit Controll flow Data flow
  • 9. Computer Hardware :- components which are visible and touchable are called as Hardware. There are different types of Hardware components. Some of them are input devices, output devices , processing devices, memory devices ,...etc.
  • 10. 18 1. Input devices :- Input devices are used to store the data into the computer. They are different types of input devices . some of them are keyboard ,mouse ,scanner, microphone . A)keyboard:- keyboard is used to enter some textual data into the computer. A keyboard contains different types of keys. some of them are Alpha numerical ( alphabet and digits), special symbols, functional keys(F1 to F12).
  • 11. B)Mouse :- Mouse is an input device that allows users to select elements on the screen. Generally a Mouse contains left button, right button and a wheel between two buttons. Left button is used to select an element. Right button specifies different operations that can perform on a element. Wheel is used to scroll the screen
  • 12. C)Scanner :- scanner is used to store textual data and images into computer understandable format called " digitalized images ". By using the digitalized images data can be transferred very fastly from one computer to another computer by using internet . D)Microphone :- microphone is used to store data into the computer in the form of audible format. microphone converts sound signals into electrical signals .
  • 13. C)Scanner :- scanner is used to store textual data and images into computer understandable format called " digitalized images ". By using the digitalized images data can be transferred very fastly from one computer to another computer by using internet . D)Microphone :- microphone is used to store data into the computer in the form of audible format. microphone converts sound signals into electrical signals .
  • 14. 22
  • 15. 2. Output devices :- output devices are used to display the output of a computer after performing the process . They are different types of output devices some of them are a)Monitor b) Printer. c) Projector d) Speakers e) Plotters
  • 16. a)Monitor :- Monitor user to display the output of the computer within itself. Generally these are called as visible display unit (or) video display unit. There are different types of monitors. Some of them are:- 1. CRT: - cathode ray tube. 2. LCD: - liquid crystal display 3. LED: - light emitting diode. b)Printer's:- printer are used to display the output of a computer on to the paper. There are different types of printers. Some of them are 1. Dot matrix printers 2. Inkjet printers 3. Laser printers
  • 17. c)projectors :- projectors are used to display the output of a computer on to a screen or on to a wall. d)speakers:- speaker are used to view the output of a computer in the form of a audible format. They are used to convert electrical signals into sound signals. e)plotters :- plotters are used to display the output of a computer in the form of Banner or Flex. Note: The output of a computer can be either in the form of audible or visible. It depends upon the output device used.
  • 18. 26
  • 19. 3.processing devices :- processing devices are used to process the given data. CPU is one of the important processing devices. CPU:- ( processor or microprocessor or computer processor ) :- The full form of CPU is central processing unit . A processor is an integrated circuit made up of silicon which are mounted on a small square plastic stable surrounded by metal pins. CPU contains different types of flow control units. Some of them are:- 1. ALU (Arithmetical and logical unit) 2. CU (control unit) 3. RU (register unit)
  • 20. 1. ALU:- The full form of ALU is arithmetical and logical unit. All the arithmetic operations (Addition,subtraction,multiplication,Division and remainder) and comparison operations are performed under ALU.
  • 21. 2.CU:- The full form of CU is control unit . It controls the flow of execution within a system. Flow of execution means verifying whether the data is transferring from one location to another location . In generally data will be transferred from:-  Memory to input and output devices.  ALU to registers, ... etc.
  • 22. 3. RU:- The full form of RU is register unit. It is used to store data temporarily. RU executes the data very fastly. There will be a limited number of registers within a computer. Some of the registers are:- 1. Instruction Counter 2.Program Counter 1.Instruction Counter:- it stores the address of the present instruction. 2. Program Counter:- it stores the address of the next instruction to be executed.
  • 23. Memory Unit:- Memory unit is used to store data into the computer. Memory unit is an ordered collection of sequence of memory cells. Each memory cell can store one byte of information “one byte = 8 bits”. A bit is information represented with either “1 (or) 0”. Different types of memory sizes are:-
  • 24. Memory Unit:- Memory unit is used to store data into the computer. Memory unit is an ordered collection of sequence of memory cells. Each memory cell can store one byte of information “one byte = 8 bits”. A bit is information represented with either “1 (or) 0”. Different types of memory sizes are:-
  • 25. TERM ABBREVIATION MEMORY SIZE VALUE Byte B 8 Bits Kilo Byte KB 1024 B(210) Mega Byte MB 1024 KB(210) Giga Byte GB 1024 MB(210) Tera Byte TB 1024 GB(210) Peta Byte PB 1024 TB(210) Exa Byte EB 1024 PB(210)
  • 26. Memory is mainly classified into two types those are:-  Primary memory  Secondary memory Primary Memory(or)Main Memory:- Primary memory is used to store data , programs and results. Primary memory is mainly classified into two types .Those are a) RAM b) ROM a)RAM:- The fullform of RAM is Random Access Memory . It stores data temporarily. Read and Write operations can be performed on RAM. RAM is also called volatile Memory (Data will be deleted when switch off the systems).
  • 27. b)ROM:- The fullform of ROM is Read Only Memory . It stores data permanently. Only Read operations can be performed on ROM. ROM is also called non-volatile Memory (Data will be exist even we switch off the systems). DISADVANTAGES:-  Only small amount of data can be stored.  Cost is very high.
  • 28. Secondary Memory:- secondary storage devices are used to store the large amount of data permanently with low cost. Some of the examples of secondary storage devices are:- HDD(Hard Disc Drive) Pendrive CD(Compact Disc) DVD(Digital Video Disc) Floppy Disc
  • 29. Computer Software: - Collection of programs is called as software. Program:- A program is a set of instructions which completes a specific task. Computer software is mainly classified into four types. Those are:- 1. Operating system (or) system software 2. Application software 3. Software Packages 4. Software utilities
  • 30. 1. Operating system (or) system software:- operating system contains collection of programmes which are used interact with the hardware components. Some of the examples are DOS, Windows, Linux,.etc. Some of the responsibilities of the Operating system are:- 1.Managing the memory allocation. 2.Collecting input from the input devices. 3.Writing data to the secondary storage devices...etc.
  • 31. 2. Application software:- Application software contains collection of programs which are to complete a specific task some of the examples of application software are web browsers, computer games, .etc 3.Software packages:- software packages contains the collection of programs which are used to complete a particular task .some of the software packages are Word processor ,DBMS,……etc. 4.Software utilities:- software utilities contains collection of programs which are used to protect our computer. Antivirus and Firewalls are used to protect computer. Some of the examples are Norton, MacAfee,……etc.
  • 32. 40 Central Processing Unit Memory Unit Arithmetic Logic Unit Control Unit Register Unit Input Devices Output Devices ROM RAM
  • 33. 41 Advantages of computers: 1. High speed 2. Accuracy 3. Storage 4. Diligence 5. Versatile
  • 34. Programming Languages A program is a set of logically related instructions that are placed in a sequence solve a problem using the computer. To write a computer program there are different types of programming languages. Programming languages are mainly into 2 types. Those are 1.Low Level Languages (LLL) 2. High Level Languages (HLL)
  • 35. PROGRAMMING LANGUAGES  As a programmer when we required to interact with a computer we need a communication channel called programming language. COMMUNICATION CHANNEL PL BINARY PROGRAMME R COMPUTER BINAR Y PROGRAMME R TRANSLATOR COMPUTER SOFTWARE USER
  • 36. A)Low Level Languages (LLL) :- Machine level language and assembly level languages are called as low level languages. Machine Level Languages:- In Machine level language instructions of a program are written by using machine codes. 1 (or) 0 are called as machine codes. Machine language is also called as binary language. Because, instructions are written using binary digits (1 (or) 0). ”1” represents “on” and “0” represents “off”. Machine language is considered as first generation language.  Example:1001 0001 0010 1100  0010 1111 0101 0011
  • 37. 45 ADVANTAGES:- 1.It makes fast and efficient use of computer. 2. No translator is required to execute the program. DIS-ADVANTAGES:- 1. Difficult to remember all the operations. 2. All memory addresses have to be remembered. ASSEMBLY LEVEL LANGUAGE:- In Assembly level language instructions of the program are written using mnemonic codes. A mnemonic code means using simple English words. Some of the examples are ADD, SUB ,MUL ,DIV ,MOVE,…...etc
  • 38. Example: DATA SEGMENT - - - - - - DATA ENDS CODE SEGMENT - - - - - - MOV AX, N1 MOV BX, N2 ADD AX, BX - - - - - - CODE ENDS Assembly level language can be considered as second generation language.
  • 39. ADVANTAGES:- 1. Easy to understand when compared to machine language. 2. Errors can easily detected and removed. DIS-ADVANTAGES:- 1. Assembly level language program are machine dependent program. 2. Programming is difficult and time consuming.
  • 40. B)High Level Languages (HLL) :- High-level languages programs are formed with the combination of simple English sentences. High-level languages are easier to design programs compared to machine language and assembly language. High-level languages are also called third generation languages (3GL).
  • 41. Examples: Pascal, FORTRAN, COBOL, C, C++, Java etc., Advantages: Readability Portability Easy debugging Ease in the development of software High-level languages are further classified into 3different types such as: 1.Procedural languages 2. Structured programming languages 3. Object-oriented languages
  • 42.  a) Procedural languages:  Program is divided into number of procedures and data can be moved from one place to another place. Examples: FORTRAN, BASIC, COBOL etc., b) Structured programming languages: Program is divided into number of functions and data can be moved from one function to another function. User-defined functions are introduced.  Examples: PASCAL, C etc.,  c) Object-oriented languages:  Program is divided into number of objects.  Objects can communicate with each other through functions.  Data can be accessed only by the specified object.  Data security constraints are added.  Examples: C++ , JAVA etc.,
  • 43. ADVANTAGES:- 1. Programs written in HLL are more reliable than assembly level and machine level language. 2. Portability – HLL programs can execute on different machines with or no modifications. 3. Errors can easily detect and corrected. DIS-ADVANTAGES:- Translators are required to convert the program from one language another language .
  • 44. 52 TRANSLATORS A translator is a program that converts the given programming language from one type to machine codes and vice-versa. The process of conversion is known as Compilation. (Source program) (Object Program)
  • 45. 53 Different types of translators are: Assembler Compiler Interpreter
  • 46. 54 Assembler It is a translator used to convert the assembly language programs into machine code and vice versa. Assembly Language Program Assembler Machine Language Program (Source program) (Object Program)
  • 47. 55 Compiler It is a translator used to convert the high-level language programs into machine code and vice-versa. High-level Language Program Compiler Machine Language Program (Source program) (Object Program)
  • 48. 56 Interpreter It is also used as a translator for high- level language programs. It accepts source program line by line and translates it into machine language, which is immediately executed. High-level Language Program Interpreter loaded system Results Data
  • 49. 57 ALGORITHMS An algorithm is a step-by-step procedure of solving the given problem statement. In general, algorithms are designed by using pseudo code. Pseudo code is a language independent code.
  • 50. 58 Algorithms may be represented in 4 different ways. Those are: 1.Step-form 2.Pseudo-code 3.Flowchart 4.Nassi-Shneiderman Diagram
  • 51. Step form :- In Step form representation the normal language is used to represent the statements. Pseudo code:- It uses vocabulary to define the statements of an algorithm. Flow Chart:- It uses specific symbols to represent each statement. NASSI SCHNELDERMANN:- It uses specific symbols to represent each statement.
  • 52. All algorithms must satisfy the following 5 characteristics. 1.Input 2.Output 3.Definiteness 4.Finiteness 5. Effectiveness
  • 53. Input:- Values required to execute the statements of an algorithm are called as input. Zero (or) more values required to solve the problem. Output:- The values that are obtained after execution of statements of an algorithm are called as output. Atleast one value will come as output. Finiteness: - The algorithm must terminates after some finite sequence of steps.
  • 54. Definiteness:- Each statement of an algorithm must be in a clear format. Ex:- 1. Add 10 to y (Clear format) 2. Add 10 (or) 20 to y (not in a clear format) Effectiveness: - Each statement is must be in simple basic format.
  • 55. 63 Basic rules followed while designing algorithms are: 1. Each algorithm will be logically enclosed between two statements i.e start and stop. 2. To accept data from the user input (or) read statement is used. 3. To display data as output. Write (or) print statements are used. 4. “ ““(Left arrow) mark is used to assign a value to a variable. 5. +, -, *, /, % are used to perform arithmetic operations on two values. 6. AND, OR, NOT are used for conjunction, disjunction, negative operations.
  • 56. 64 Example: Algorithm for addition of given two values using step-form representation. Step 1: START Step 2: Read two input values as x and y Step 3: Add x and y values and store the result value in z Step 4: Print addition result value as z Step 5: STOP
  • 57. 65 Algorithm for addition of given two values using pseudo-code representation. Step 1: START Step 2: INPUT x , y Step 3: z ← x + y Step 4: PRINT z Step 5: STOP
  • 58. 66 ALGORITHM TYPES In general, the steps in an algorithm can be divided into three basic categories as: 1. Sequence algorithm 2. Selection algorithm 3. Iteration algorithm a) Sequence algorithm: A sequence algorithm is a series of steps in sequential order without any break. Instructions are executed from top to
  • 59. 67 Example: Write an algorithm to perform Average of three numbers Step 1: START Step 2: Read 3 values as A,B and C Step 3: AVERAGE ← ( (A+B+C) / 3 ) Step 4: PRINT AVERAGE Step 5: STOP
  • 60. 68 2. Selection algorithm Steps of an algorithm are designed by selecting appropriate condition checking is called as selection algorithms. Selection algorithms are designed using selection control statements such as IF, IF-ELSE, Nested IF-ELSE, ELSE-IF and SWITCH statements.
  • 61. 69 Example: Write an algorithm to whether a person is eligible to vote or not. 1) Start 2) Read age value 3) If (age >= 18) 3.1) write “ eligible to vote” Else 3.2) write age is not eligible to vote 4) Stop
  • 62. 70 c) Iteration algorithm: Steps of an algorithm are designed based on certain conditions and repeatedly processed the same statements until the specified condition becomes false is called as iteration algorithms. Iteration algorithms are designed using iterative control statements such as WHILE, D0-WHILE and FOR statements.
  • 63. 71 Example:Algorithm for sum of individual digits of given number Step 1: START Step 2: INPUT n value Step 3: sum ← 0 Step 4: Repeat WHILE n > 0 k ← n MOD 10 sum ← sum+ k n ← n / 10 End Repeat Step 5: PRINT sum Step 6: STOP
  • 64. 72 FLOWCHARTS Pictorial / Graphical / Diagrammatic representation of an algorithm is called as a flowchart. Flowcharts are usually drawn using standard symbols.
  • 65. 73 START / STOP STATEMENETS The symbol used to represent START / STOP statements is “Oval”. Symbol: Example: STOP START
  • 66. 74 INPUT / OUTPUT STATEMENETS The symbol used to represent input statements and output statements is “Parallelogram”. Symbol: Example: INPUT x,y values PRINT z value
  • 67. 75 FLOW LINE STATEMENETS The symbol used to represent data flow from one place to another place is “Arrow”. Arrow symbols are also used to connect every two symbols in the flowchart. Symbol:
  • 69. 77 PROCESS STATEMENETS The symbol used to represent processing instructions is “Rectangle”. Assignment statements and calculation statements are placed inside the rectangle symbol. Symbol: Example: Z ← X + Y
  • 70. 78 CONNECTOR STATEMENET The symbol used to connect every two parts of the program flow is “Circle”. Symbol: Example: START A A STOP
  • 71. 79 DECISION MAKING STATEMENET The symbol used for representing decision parts of the program is “Diamond/Rhombus”. Symbol: Example:
  • 72. 80 Additional symbols used for designing complex flowcharts are: SYMBOL DESCRIPTION DATA BASE SUB ROUTINE MULTIDOCUMENTS IDEL OR WAITING STATE EXTRACTS INDIVIDUAL SETS OF DATA ITEMS MERGE
  • 73. 81 Example: Draw a flowchart to find reverse of a given value.
  • 74. 82 Program Development Steps: The main important phases while developing a Program are: 1. Analysis 2. Algorithm & Flowchart 3. Program Design 4. Compilation 5. Program Execution 6. Testing & Validation
  • 75. 83 1. Analysis: Analysis phase is also referred as specification requirement analysis. In this phase, analyze the given problem to determine the input requirements and the expected output.
  • 76. 84 Example: Problem Statement : Addition of given two values Input requirements : Two numbers as x and y Expected output : Addition Value of x and y
  • 77. 85 2. Algorithm & Flowchart: Solution of the given problem statement is represented in terms of a step- by-step procedure is known as an algorithm. The steps of the algorithm is represented in the form of a pictorial representation is called as a flowchart.
  • 78. 86 Example: Algorithm for addition of given two values Step 1: START Step 2: INPUT two values as x , y Step 3: z ← x + y Step 4: PRINT z value Step 5: STOP
  • 79. 87 Example: Flowchart for addition of given two values. START INPUT x,y values z ← x + y PRINT z value STOP
  • 80. 88 3. Program Design: The flowchart and algorithm steps developed in the previous phase is converted into actual programs by selecting any programming languages like C, C++ etc.,
  • 81. 89 Example: Program for addition of given two values in C language #include<stdio.h> #include<conio.h> main() { int x,y,sum; clrscr(); printf(“nEnter Two Numbers =”); scanf(“%d%d”,&x,&y); sum = x+y; printf(“n Addition Result = %d”,sum); }
  • 82. 90 4. Compilation: The process of converting the source program from one language to machine language is called as compilation process. Typing and syntax errors are found at the time of compilation process.
  • 83. 91 Example: In C language, the above program is compiled by pressing either F9 (or) Alt F9 keys
  • 84. 92 5. Program Execution: In this phase, it may arise two types of problems such as Run-time errors and Logical errors.
  • 85. 93 Run-Time Errors: These errors may occur during the execution of the programs even though the program is successfully compiled. The most common types of run time errors are: Example: Divide-By-Zero, Array-Out-Of-Bounds etc.,
  • 86. 94 Logical Errors: These errors may occur due to incorrect usage of the instructions in the program. These errors are neither detected during compilation or execution nor cause any stoppage to the program execution.
  • 87. 95 Example: In C language, the above program is executed by pressing ctrl F9 keys
  • 88. 96 6. Testing & Validation: In this phase, the program is tested by submitting proper input values. And then program is validated with different valid inputs.
  • 89. 97 Example: Input : Enter Two Numbers = 10 20 Output: Addition Result = 30
  • 90. 98 SOFTWARE DEVELOPMENT METHOD Modern projects are built using a series of interrelated phases commonly referred as the Software Development Life Cycle (SDLC). It is also called as Software Development Process.
  • 91. Software Development Life Cycle (SDLC):  Following are the most important and popular SDLC models followed in the industry −  Waterfall Model  Iterative Model  Spiral Model  V-Model  Big Bang Model
  • 92. 100 The main important phases in software development method are: 1. Requirement gathering & Analysis 2. System Design 3. Implementation (or) Coding 4. Testing 5. Deployment 6. Maintenance
  • 93. Requirement gathering and analysis:  Requirements are gathered in this phase  In this phase project managers and stack holders are involved  Meeting with managers, stake holders and users are held in order to determine the requirements · who is going to use the system · how will they use the system · what data should be input into the program  After gathering requirements these requirements are analyzed. Finally a requirement specification is created, which serves guideline for the next phase .
  • 94. Requirement gathering and analysis: Example: Problem Statement : Addition of given two values Input requirements : Read two numbers as A and B Expected output : Addition Value as A+B
  • 95. System design: The following points should be consider in this phase: 1. What are the hardware components required to solve the problem. 2. Which type of programming language should be used to develop the programs. 3. System Architecture is prepared. 4. Algorithms & flowcharts are prepared.
  • 96. System design: Algorithm:  Solution of the given problem statement is represented interms of a step-by-step procedure is known as an algorithm. Flowchart:  The steps of the algorithm is represented in the form of a pictorial representation is called as a flowchart.
  • 97. Algorithm:  Step 1: START  Step 2: READ A, B  Step 3: sum ← A + B  Step 4: WRITE sum  Step 5: STOP Flow Chart
  • 98. Coding/Implementation: The flowchart and algorithm steps developed in the previous phase is converted into actual programs by selecting any programming languages like C, C++ etc., This is the longest phase in software development method.
  • 99. Program Design (Code/Implementation): Example: Program for addition of given two values in C language. #inlcude<stdio.h> #include<conio.h> main() { int x,y,sum; clrscr(); pritnf(“nEnter Two Numbers:”); scanf(“%d%d”,&A,&B); sum = A+B; printf(“nTotal:%d”,sum); }
  • 100. Testing & Validation:  Verifying the software working according to user requirements (or) not is called as testing.  During this phase unit testing, integration testing, system testing and acceptance testing are done.  In this phase, the program is tested by submitting proper input values.  And then program is validated with different valid inputs. Example: Input : Enter Two numbers : 10 20 Output : Total : 30
  • 101. Deploment: After completing the testing process the developed product delivered to the customer is called deployment. Maintenance: when the customer starts using the developed system then the actual problems comes up and needs to be solved from time to time. This process whose take care by the developed product is known as