Match the columns.

(a)

Nested loop

(i) Never editing loop
(b) Infinite loop (ii) indefinite loop
(c) For loop (iii) Loop inside another loop
(d) While loop (iv) Termination The loop
(e) Break (v) Definite loop

 

Answer:

(a) Nested loop (i) Loop inside another loop
(b) Infinite loop (ii) Never editing loop
(c) For loop (iii) Definite loop
(d) While loop (iv) Indefinite loop
(e) Break (v) Termination The loop

 

Explanation:

  1. Nested loop - A loop inside a loop is called a nested loop.
  2. Infinite loop - A loop that never terminates is called an infinite loop.
  3. For loop - The for statement is used to iterate over a range of values or a sequence . Hence it is a definite loop.
  4. While loop - The while statement executes a block of code repeatedly as long as the control condition of the loop is true. Hence, it is an indefinite loop.
  5. Break - The break statement alters the normal flow of execution as it terminates the current loop and resumes execution of the statement following that loop.
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