SlideShare a Scribd company logo
1 of 9
Download to read offline
C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 1
Handout#1
Assignment/Program Statement:
Introduction to Computer and Study of basics of programming such as algorithm
and flowchart.
Learning Objectives:
Students will be able to
- explain computer parts,
- write an algorithm
- draw flowchart
Theory:
Computer:
Computer is an advanced electronic device that takes raw data as input from the
user and processes it under the control of set of instructions (called program), gives
the result (output), and saves it for the future use.
Block Diagram of Computer and Various Components of Computer:
 Computer is a device that transforms data into meaningful information.
 Data can be anything like marks obtained by you in various subjects.
 It can also be name, age, sex, weight, height, etc. of all the students in a
class.
 Computer can also be defined in terms of functions it can perform.
 A computer can i) accept data, ii) store data, iii) process data as desired,
and iv) retrieve the stored data as and when required and v) print the
result in desired format.
 The major characteristics of a computer are high speed, accuracy,
diligence, versatility and storage.
 A computer as shown in figure performs basically five major computer
operations or functions irrespective of their size and make. These are:
1) It accepts data or instructions by way of input,
2) It stores data (STORAGE UNIT),
3) It can process data as required by the user (ALU),
C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 2
4) It gives results in the form of output (OUTPUT UNIT), and
5) It controls all operations inside a computer (CONTROL UNIT).
1. Input:
 This is the process of entering data and programs in to the computer system.
 Computer takes as inputs raw data and performs some processing giving out
processed data.
 Therefore, the input unit takes data from us to the computer in an organized
manner for processing.
2. Storage:
 The process of saving data and instructions permanently is known as
storage.
 Data has to be fed into the system before the actual processing starts. It is
because the processing speed of Central Processing Unit (CPU) is so fast
that the data has to be provided to CPU with the same speed.
 Therefore the data is first stored in the storage unit for faster access and
processing. This storage unit provides space for storing data and
instructions.
 The storage unit performs the following major functions:
- All data and instructions are stored here before and after processing.
- Intermediate results of processing are also stored here.
INPUT
UNIT
STORAGE
UNIT
OUTPUT
UNIT
CONTROL
UNIT
ARITHMETIC
LOGIC UNIT
PROGRAM
& DATA
RESULTS
CENTRAL
PROCESSING
UNIT
(CPU)
Figure: Basic Computer Operations
C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 3
3. Processing:
 The task of performing operations like arithmetic and logical operations is
called processing.
 The Central Processing Unit (CPU) takes data and instructions from the
storage unit and makes all sorts of calculations based on the instructions
given and the type of data provided. It is then sent back to the storage unit.
4. Output:
 This is the process of producing results from the data for getting useful
information.
 Similarly the output produced by the computer after processing must also be
kept somewhere inside the computer before being given to you in human
readable form.
 Therefore, the output is also stored inside the computer for further
processing.
5. Control:
 The manner how instructions are executed and the above operations are
performed.
 Controlling of all operations like input, processing and output are performed
by control unit.
 It takes care of step by step processing of all operations inside the computer.
[Reference:http://ecomputernotes.com/fundamental/introduction-to-computer/draw-the-block-
diagram-of-computer-and-explain-its-various-components ]
Algorithm:
An algorithm is a well-defined procedure that allows a computer to solve a
problem.
OR
An algorithm is a sequence of unambiguous instructions.
OR
An algorithm is an ordered sequence of instructions for solving a problem.
OR
C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 4
An algorithm is any well-defined computational procedure that takes some
value, or set of values, as input and produces some value, or set of values, as
output. An algorithm is thus a sequence of computational steps that transform the
input into the output.
[Reference: http://algoviz.org/OpenDSA/Books/CS3114/html/AnalPrelim.html# ]
Ex.1 Suppose we want to calculate addition of two numbers then algorithm could
be,
Algorithm: Addition of two numbers.
Step1: Read two numbers a & b.
Step2: Calculate addition c=(a+b).
Step3: Print addition i.e. print c.
Step4: Stop
Ex.2 Write an algorithm to read two numbers and print the bigger.
Algorithm: Bigger of two numbers.
Step1: Read a & b
Step2: if a>b
print a
goto step3
else
print b.
goto step3
Step3: Stop
Ex.3 Write an algorithm to print 1 to 10 numbers.
Algorithm: Print 1 to 10 numbers.
Step1: Start
Step2: i=1
Step3: if i<=10
print i
i=i+1
go to step3
else
C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 5
go to step4
Step4: Stop.
Flowchart:
The flowchart is a diagrammatic/graphical/pictorial representation of the
algorithm.
OR
An algorithm can be written as a list of steps using text, or as a picture called a
flowchart.
Elements of a Flowchart:
 Various geometrical shaped boxes represent the steps of the solution.
 The boxes are connected by directional arrows to show the flow of the
solution.
Flowchart Symbols: In a flowchart each type of symbol has a specific meaning.
Some flowchart symbols are given below:
Symbol Name Meaning
Terminal Start and Stop Box
Parallelogram Input and Output Box
Rectangle Process Box
Rhombus Decision Making Box
C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 6
Circle Continuation Box
Arrows Flow Arrows
Hexagon Repetition/Looping
Guidelines to draw a flowchart:
 Identify input and output.
 Apply reasoning skills to solve the problem.
 Draw the flowchart using the appropriate symbols and arrows to show the
sequence of steps in solving the problem.
C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 7
Ex.1 Draw flowchart for calculating Ex.2 Draw flowchart for calculating
addition of two numbers. average of three numbers.
Uses of Flowchart:
 Flowcharts are useful to study the problem because diagrammatic
representation can be easily understood by human beings.
 To specify the method of solving a problem.
 To plan the sequence of a computer program.
 Communicate ideas, solutions.
Ex.3 Draw flowchart to read two numbers and print the bigger.
C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 8
Ex.4 Draw flowchart to print 1 to 10 numbers.
[Reference: http://cprogrammingcodes.blogspot.in/2011/09/algorithms-and-flowchart.html ]
C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 9
Practice Problem Statements:
1) Write an algorithm to calculate average of 3 numbers.
2) Write an algorithm to read mark of the subject and print the result. Given
that a candidate must score at least 40 marks to pass the subject.
3) Draw flowchart to read mark of the subject and print the result. Given that a
candidate must score at least 40 marks to pass the subject.
4) Draw a flow chart to display 1 to 50 numbers.
Conclusion:
Thus we studied
- Basic blocks of computer
- Algorithm
- Flowchart
Learning Objectives:
At the end of this assignment, students are able to
- explain computer parts,
- write an algorithm
- draw flowchart

More Related Content

What's hot

Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language CourseVivek chan
 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c languageRai University
 
Sample for Simple C Program - R.D.Sivakumar
Sample for Simple C Program - R.D.SivakumarSample for Simple C Program - R.D.Sivakumar
Sample for Simple C Program - R.D.SivakumarSivakumar R D .
 
Overview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya JyothiOverview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya JyothiSowmya Jyothi
 
VTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CVTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CSyed Mustafa
 
User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.NabeelaNousheen
 
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMCLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMRc Os
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software developmentHattori Sidek
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programmingprogramming9
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manualAnil Bishnoi
 

What's hot (20)

Learning the C Language
Learning the C LanguageLearning the C Language
Learning the C Language
 
Learn C
Learn CLearn C
Learn C
 
Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language Course
 
Casa lab manual
Casa lab manualCasa lab manual
Casa lab manual
 
C Programming
C ProgrammingC Programming
C Programming
 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c language
 
Sample for Simple C Program - R.D.Sivakumar
Sample for Simple C Program - R.D.SivakumarSample for Simple C Program - R.D.Sivakumar
Sample for Simple C Program - R.D.Sivakumar
 
Cnotes
CnotesCnotes
Cnotes
 
Overview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya JyothiOverview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya Jyothi
 
VTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CVTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in C
 
User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.
 
Ocs752 unit 5
Ocs752   unit 5Ocs752   unit 5
Ocs752 unit 5
 
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMCLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
 
Ocs752 unit 2
Ocs752   unit 2Ocs752   unit 2
Ocs752 unit 2
 
C fundamentals
C fundamentalsC fundamentals
C fundamentals
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
 
Ocs752 unit 4
Ocs752   unit 4Ocs752   unit 4
Ocs752 unit 4
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manual
 
Lecture 21 22
Lecture 21 22Lecture 21 22
Lecture 21 22
 

Similar to CP Handout#1

Chapter 1 basic structure of computers
Chapter 1  basic structure of computersChapter 1  basic structure of computers
Chapter 1 basic structure of computersGurpreet Singh
 
chapter 1 -Basic Structure of Computers.ppt
chapter 1 -Basic Structure of Computers.pptchapter 1 -Basic Structure of Computers.ppt
chapter 1 -Basic Structure of Computers.pptsandeepPingili1
 
chapter1-basicstructureofcomputers.ppt
chapter1-basicstructureofcomputers.pptchapter1-basicstructureofcomputers.ppt
chapter1-basicstructureofcomputers.pptKarrarIbrahimAbdAlam
 
Computer education presentation - ARCH 383
Computer education presentation - ARCH 383Computer education presentation - ARCH 383
Computer education presentation - ARCH 383LipikaPandey
 
Chapter 2_Computers In our Daily Life_Week 4-6.pptx
Chapter 2_Computers In our Daily Life_Week 4-6.pptxChapter 2_Computers In our Daily Life_Week 4-6.pptx
Chapter 2_Computers In our Daily Life_Week 4-6.pptxnorwinadriatico
 
Chapter1 basic structure of computers
Chapter1  basic structure of computersChapter1  basic structure of computers
Chapter1 basic structure of computersjismymathew
 
module 1 computer architecture diploma
 module 1 computer architecture diploma   module 1 computer architecture diploma
module 1 computer architecture diploma Manoharan Ragavan
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computersKumar
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computersKumar
 
Problem-solving and design 1.pptx
Problem-solving and design 1.pptxProblem-solving and design 1.pptx
Problem-solving and design 1.pptxTadiwaMawere
 
COMMUNICATION & COMPUTER SKILLS
COMMUNICATION & COMPUTER SKILLSCOMMUNICATION & COMPUTER SKILLS
COMMUNICATION & COMPUTER SKILLSMakaha Rutendo
 
Computer organisation Module 1.ppt
Computer organisation Module 1.pptComputer organisation Module 1.ppt
Computer organisation Module 1.pptSoulReaper21
 
Ia syllabus Topic computer Related
Ia syllabus Topic computer RelatedIa syllabus Topic computer Related
Ia syllabus Topic computer RelatedOnline Job Study
 

Similar to CP Handout#1 (20)

C q 1
C q 1C q 1
C q 1
 
CAO-Unit-I.pptx
CAO-Unit-I.pptxCAO-Unit-I.pptx
CAO-Unit-I.pptx
 
Chapter 1 basic structure of computers
Chapter 1  basic structure of computersChapter 1  basic structure of computers
Chapter 1 basic structure of computers
 
chapter 1 -Basic Structure of Computers.ppt
chapter 1 -Basic Structure of Computers.pptchapter 1 -Basic Structure of Computers.ppt
chapter 1 -Basic Structure of Computers.ppt
 
chapter1-basicstructureofcomputers.ppt
chapter1-basicstructureofcomputers.pptchapter1-basicstructureofcomputers.ppt
chapter1-basicstructureofcomputers.ppt
 
UNIT I.ppt
UNIT I.pptUNIT I.ppt
UNIT I.ppt
 
Computer education presentation - ARCH 383
Computer education presentation - ARCH 383Computer education presentation - ARCH 383
Computer education presentation - ARCH 383
 
Chapter 2_Computers In our Daily Life_Week 4-6.pptx
Chapter 2_Computers In our Daily Life_Week 4-6.pptxChapter 2_Computers In our Daily Life_Week 4-6.pptx
Chapter 2_Computers In our Daily Life_Week 4-6.pptx
 
unit-i.pdf
unit-i.pdfunit-i.pdf
unit-i.pdf
 
Chapter1-Introduction.pdf
Chapter1-Introduction.pdfChapter1-Introduction.pdf
Chapter1-Introduction.pdf
 
Chapter1 basic structure of computers
Chapter1  basic structure of computersChapter1  basic structure of computers
Chapter1 basic structure of computers
 
module 1 computer architecture diploma
 module 1 computer architecture diploma   module 1 computer architecture diploma
module 1 computer architecture diploma
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
 
Problem-solving and design 1.pptx
Problem-solving and design 1.pptxProblem-solving and design 1.pptx
Problem-solving and design 1.pptx
 
COMMUNICATION & COMPUTER SKILLS
COMMUNICATION & COMPUTER SKILLSCOMMUNICATION & COMPUTER SKILLS
COMMUNICATION & COMPUTER SKILLS
 
Computer organisation Module 1.ppt
Computer organisation Module 1.pptComputer organisation Module 1.ppt
Computer organisation Module 1.ppt
 
Pipeline Computing by S. M. Risalat Hasan Chowdhury
Pipeline Computing by S. M. Risalat Hasan ChowdhuryPipeline Computing by S. M. Risalat Hasan Chowdhury
Pipeline Computing by S. M. Risalat Hasan Chowdhury
 
UNIT-1.pptx
UNIT-1.pptxUNIT-1.pptx
UNIT-1.pptx
 
Ia syllabus Topic computer Related
Ia syllabus Topic computer RelatedIa syllabus Topic computer Related
Ia syllabus Topic computer Related
 

More from trupti1976

MobileAppDev Handout#3
MobileAppDev Handout#3MobileAppDev Handout#3
MobileAppDev Handout#3trupti1976
 
MobileAppDev Handout#10
MobileAppDev Handout#10MobileAppDev Handout#10
MobileAppDev Handout#10trupti1976
 
MobileAppDev Handout#9
MobileAppDev Handout#9MobileAppDev Handout#9
MobileAppDev Handout#9trupti1976
 
MobileAppDev Handout#8
MobileAppDev Handout#8MobileAppDev Handout#8
MobileAppDev Handout#8trupti1976
 
MobileAppDev Handout#7
MobileAppDev Handout#7MobileAppDev Handout#7
MobileAppDev Handout#7trupti1976
 
MobileAppDev Handout#6
MobileAppDev Handout#6MobileAppDev Handout#6
MobileAppDev Handout#6trupti1976
 
MobileAppDev Handout#5
MobileAppDev Handout#5MobileAppDev Handout#5
MobileAppDev Handout#5trupti1976
 
MobileAppDev Handout#4
MobileAppDev Handout#4MobileAppDev Handout#4
MobileAppDev Handout#4trupti1976
 
MobileAppDev Handout#2
MobileAppDev Handout#2MobileAppDev Handout#2
MobileAppDev Handout#2trupti1976
 
MobileAppDev Handout#1
MobileAppDev Handout#1MobileAppDev Handout#1
MobileAppDev Handout#1trupti1976
 

More from trupti1976 (11)

MobileAppDev Handout#3
MobileAppDev Handout#3MobileAppDev Handout#3
MobileAppDev Handout#3
 
MobileAppDev Handout#10
MobileAppDev Handout#10MobileAppDev Handout#10
MobileAppDev Handout#10
 
MobileAppDev Handout#9
MobileAppDev Handout#9MobileAppDev Handout#9
MobileAppDev Handout#9
 
MobileAppDev Handout#8
MobileAppDev Handout#8MobileAppDev Handout#8
MobileAppDev Handout#8
 
MobileAppDev Handout#7
MobileAppDev Handout#7MobileAppDev Handout#7
MobileAppDev Handout#7
 
MobileAppDev Handout#6
MobileAppDev Handout#6MobileAppDev Handout#6
MobileAppDev Handout#6
 
MobileAppDev Handout#5
MobileAppDev Handout#5MobileAppDev Handout#5
MobileAppDev Handout#5
 
MobileAppDev Handout#4
MobileAppDev Handout#4MobileAppDev Handout#4
MobileAppDev Handout#4
 
MobileAppDev Handout#2
MobileAppDev Handout#2MobileAppDev Handout#2
MobileAppDev Handout#2
 
MobileAppDev Handout#1
MobileAppDev Handout#1MobileAppDev Handout#1
MobileAppDev Handout#1
 
CP Handout#7
CP Handout#7CP Handout#7
CP Handout#7
 

Recently uploaded

IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Recently uploaded (20)

IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

CP Handout#1

  • 1. C-Programming Walchand Institute of Technology (RC1131), Solapur Page 1 Handout#1 Assignment/Program Statement: Introduction to Computer and Study of basics of programming such as algorithm and flowchart. Learning Objectives: Students will be able to - explain computer parts, - write an algorithm - draw flowchart Theory: Computer: Computer is an advanced electronic device that takes raw data as input from the user and processes it under the control of set of instructions (called program), gives the result (output), and saves it for the future use. Block Diagram of Computer and Various Components of Computer:  Computer is a device that transforms data into meaningful information.  Data can be anything like marks obtained by you in various subjects.  It can also be name, age, sex, weight, height, etc. of all the students in a class.  Computer can also be defined in terms of functions it can perform.  A computer can i) accept data, ii) store data, iii) process data as desired, and iv) retrieve the stored data as and when required and v) print the result in desired format.  The major characteristics of a computer are high speed, accuracy, diligence, versatility and storage.  A computer as shown in figure performs basically five major computer operations or functions irrespective of their size and make. These are: 1) It accepts data or instructions by way of input, 2) It stores data (STORAGE UNIT), 3) It can process data as required by the user (ALU),
  • 2. C-Programming Walchand Institute of Technology (RC1131), Solapur Page 2 4) It gives results in the form of output (OUTPUT UNIT), and 5) It controls all operations inside a computer (CONTROL UNIT). 1. Input:  This is the process of entering data and programs in to the computer system.  Computer takes as inputs raw data and performs some processing giving out processed data.  Therefore, the input unit takes data from us to the computer in an organized manner for processing. 2. Storage:  The process of saving data and instructions permanently is known as storage.  Data has to be fed into the system before the actual processing starts. It is because the processing speed of Central Processing Unit (CPU) is so fast that the data has to be provided to CPU with the same speed.  Therefore the data is first stored in the storage unit for faster access and processing. This storage unit provides space for storing data and instructions.  The storage unit performs the following major functions: - All data and instructions are stored here before and after processing. - Intermediate results of processing are also stored here. INPUT UNIT STORAGE UNIT OUTPUT UNIT CONTROL UNIT ARITHMETIC LOGIC UNIT PROGRAM & DATA RESULTS CENTRAL PROCESSING UNIT (CPU) Figure: Basic Computer Operations
  • 3. C-Programming Walchand Institute of Technology (RC1131), Solapur Page 3 3. Processing:  The task of performing operations like arithmetic and logical operations is called processing.  The Central Processing Unit (CPU) takes data and instructions from the storage unit and makes all sorts of calculations based on the instructions given and the type of data provided. It is then sent back to the storage unit. 4. Output:  This is the process of producing results from the data for getting useful information.  Similarly the output produced by the computer after processing must also be kept somewhere inside the computer before being given to you in human readable form.  Therefore, the output is also stored inside the computer for further processing. 5. Control:  The manner how instructions are executed and the above operations are performed.  Controlling of all operations like input, processing and output are performed by control unit.  It takes care of step by step processing of all operations inside the computer. [Reference:http://ecomputernotes.com/fundamental/introduction-to-computer/draw-the-block- diagram-of-computer-and-explain-its-various-components ] Algorithm: An algorithm is a well-defined procedure that allows a computer to solve a problem. OR An algorithm is a sequence of unambiguous instructions. OR An algorithm is an ordered sequence of instructions for solving a problem. OR
  • 4. C-Programming Walchand Institute of Technology (RC1131), Solapur Page 4 An algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output. An algorithm is thus a sequence of computational steps that transform the input into the output. [Reference: http://algoviz.org/OpenDSA/Books/CS3114/html/AnalPrelim.html# ] Ex.1 Suppose we want to calculate addition of two numbers then algorithm could be, Algorithm: Addition of two numbers. Step1: Read two numbers a & b. Step2: Calculate addition c=(a+b). Step3: Print addition i.e. print c. Step4: Stop Ex.2 Write an algorithm to read two numbers and print the bigger. Algorithm: Bigger of two numbers. Step1: Read a & b Step2: if a>b print a goto step3 else print b. goto step3 Step3: Stop Ex.3 Write an algorithm to print 1 to 10 numbers. Algorithm: Print 1 to 10 numbers. Step1: Start Step2: i=1 Step3: if i<=10 print i i=i+1 go to step3 else
  • 5. C-Programming Walchand Institute of Technology (RC1131), Solapur Page 5 go to step4 Step4: Stop. Flowchart: The flowchart is a diagrammatic/graphical/pictorial representation of the algorithm. OR An algorithm can be written as a list of steps using text, or as a picture called a flowchart. Elements of a Flowchart:  Various geometrical shaped boxes represent the steps of the solution.  The boxes are connected by directional arrows to show the flow of the solution. Flowchart Symbols: In a flowchart each type of symbol has a specific meaning. Some flowchart symbols are given below: Symbol Name Meaning Terminal Start and Stop Box Parallelogram Input and Output Box Rectangle Process Box Rhombus Decision Making Box
  • 6. C-Programming Walchand Institute of Technology (RC1131), Solapur Page 6 Circle Continuation Box Arrows Flow Arrows Hexagon Repetition/Looping Guidelines to draw a flowchart:  Identify input and output.  Apply reasoning skills to solve the problem.  Draw the flowchart using the appropriate symbols and arrows to show the sequence of steps in solving the problem.
  • 7. C-Programming Walchand Institute of Technology (RC1131), Solapur Page 7 Ex.1 Draw flowchart for calculating Ex.2 Draw flowchart for calculating addition of two numbers. average of three numbers. Uses of Flowchart:  Flowcharts are useful to study the problem because diagrammatic representation can be easily understood by human beings.  To specify the method of solving a problem.  To plan the sequence of a computer program.  Communicate ideas, solutions. Ex.3 Draw flowchart to read two numbers and print the bigger.
  • 8. C-Programming Walchand Institute of Technology (RC1131), Solapur Page 8 Ex.4 Draw flowchart to print 1 to 10 numbers. [Reference: http://cprogrammingcodes.blogspot.in/2011/09/algorithms-and-flowchart.html ]
  • 9. C-Programming Walchand Institute of Technology (RC1131), Solapur Page 9 Practice Problem Statements: 1) Write an algorithm to calculate average of 3 numbers. 2) Write an algorithm to read mark of the subject and print the result. Given that a candidate must score at least 40 marks to pass the subject. 3) Draw flowchart to read mark of the subject and print the result. Given that a candidate must score at least 40 marks to pass the subject. 4) Draw a flow chart to display 1 to 50 numbers. Conclusion: Thus we studied - Basic blocks of computer - Algorithm - Flowchart Learning Objectives: At the end of this assignment, students are able to - explain computer parts, - write an algorithm - draw flowchart