C Lecture-Introduction To C- Algorithm and Flow Chart

Introduction To C Language- Algorithm and Flow Chart (For Polytechnic College Himachal Pradesh)

We have created lecture series in Youtube about all the syllabus of Polytechnic Students of Himachal. Introduction of C Language (Hindi), video is uploaded to our official Channel and notes are provided on this blog.

Definition:  An algorithm is a step by step by step method of solving a problem.

Algorithm defines

Instructions to be executed         &     Order in which these instructions to be executed.

Properties of Algorithm:

  1. Each instruction should be unambiguous.
  2. Instructions should be precise
  3. Instructions should be executed in finite time
  4. After performing all the instructions the desired result must be obtained in the end.

Example: Algorithm for finding the Sum of two numbers.

Step 1: Input A, B

Step 2: Sum= A+B

Step 3: Print Sum

Step 4: End.

Flow Charts

Definition:  A flow chart is a graphical/pictorial representation of an algorithm.

  • Each step of the algorithm is represented by a shape.
  • A flowchart is also known as the Data Flow Diagram.

Symbols used in Flow Charts:

Symbol of Flowchart

Advantages of Flowchart:

  1. Communication :Flowchart is an easy & excellent way of communicating the logic of a program.
  2. Analyzing a problem: Flow-chart is an efficient way to analyze a problem.
  3. Helps in program development: Flowchart act as a blueprint in program development hence make program development easier.
  4. Helps programmer: It helps the programmer to write the program. (Coding)
  5. Helps in debugging: Flowchart helps to find errors in a program.
  6. Help in maintenance: Flowchart helps in maintenance of code /program after debugging phase.

Example of Flowchart: To find the sum of two numbers.

Sum of Two numbers

Example: Flow chart to find the largest of 3 numbers.

Flowchart greatest of three number

Introduction of C Language Part-2 will be available on our next blog.


Leave a Reply