English

Which of the following statements is not valid for a nested loop? - Computer Applications

Advertisements
Advertisements

Question

Which of the following statements is not valid for a nested loop?

Options

  • The break statement can be used to terminate inner as well as outer loop.

  • The outer loop can be terminated from the block of inner loop.

  • The inner loop can be terminated from the block of outer loop.

  • The inner loop repeats the execution a number of times for each iteration of the outer loop. 

MCQ

Solution

The inner loop can be terminated from the block of outer loop.

Explanation:

The inner loop cannot be directly controlled or ended by the outer loop's block. The outer loop can influence the execution of the inner loop by regulating when or if it starts, but the inner loop must be terminated inside its own scope, or by using a break statement inside the inner loop.

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.1: Nested Loop - EXERCISES [Page 145]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.1 Nested Loop
EXERCISES | Q I. 5. | Page 145
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×