Computer Applications
Which of the following statements is not valid for a nested loop?
- 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.
Java Nested for Loops
17 Likes
Answer
The inner loop can be terminated from the block of outer loop.
Reason — The inner loop cannot be terminated from the block of outer loop.
Answered By
12 Likes
Related Questions
Which of the following keywords can be used to terminate a switch case as well as a loop construct?
- continue
- void
- break
- stop
Given: for(i = 0 ; i < 4 ; i++)
for(j = 1 ; j < 4 ; j++)
……………
Statement
……………
How many times the above nested loop will iterate?- 12 times
- 8 times
- 4 times
- 16 times
State whether the following statement is True or False :
Nested loop contains a single loop.
State whether the following statement is True or False :
When break statement is applied, it terminates the loop.