What do you understand by flow of control? Explain its different types.

 

Answer:

The flow of control depicts the flow of events as represented in the flow chart. The events can flow in a sequence, or on branch based on a decision or even repeat some part for a finite number of times.

Three types of flow of control are:

  1. Sequence - It has events occurring in a sequence one after the other without being dependent on any  condition. 
  2. Selection - Here the flow of control gets branched based on whether a particular condition evaluates to  true or false. 
  3. Repetition - Here a sequence of steps is performed iteratively until some condition is met.
Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and Computer Science at Teachoo