- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is an algorithm and flowchart in C language?
Algorithm is a step – by – step procedure which is helpful in solving a problem. If, it is written in English like sentences then, it is called as ‘PSEUDO CODE’.
Properties of an Algorithm
An algorithm must possess the following five properties −
Algorithm for finding the average of three numbers is as follows −
- Read 3 numbers a,b,c
- Compute sum = a+b+c
- Compute average = sum/3
- Print average value
Diagrammatic representation of an algorithm is called flow chart.
Symbols used in flowchart are mentioned below −
|Input/output of data|
|Process||Rectangle||Any processing to be performaed can be represented|
|Decision box||Diamon||Decision operation that determine which of the alternative paths to be followed|
|Connector||Circle||Used to connect different parts of flowchart|
|Flow||Arrows||Join 2 symbols and also represents flow of execution|
|Pre defined process||Double Sided Rectangle||Module (or) subroutines specified else where|
|Page connector||Pentagon||Used to connect flowchart in 2 different pages|
|For loop symbol||Hexagon||shows initialization, condition and incrementation of loop variable|
|Document||Printout||Shows the data that is ready for printout|
Given below is the flowchart for finding an average of three numbers −
- Difference Between Algorithm and Flowchart
- What is an identifier in C language?
- What is an anagram in C language?
- What is an identifier and its rules in C language?
- What is an inline function in C language?
- What is an Agglomerative Clustering Algorithm?
- What is an array of structures in C language?
- What is an auto storage class in C language?
- What is an extern storage class in C language?
- What is Evaluation, Precedence and Association in C language?
- What is C++ programming language?
- What is malloc in C language?
- What is Calloc in C language?
- What is Realloc in C language?
- What is out of bounds index in an array - C language?