Computer Science, asked by anshul2430, 1 year ago

Give answers of each of the following in one word.
(a) It stops the execution of loop.
(b) This statement doesn't require any operator or value.
(c) It is used to start the loop from beginning.​

Answers

Answered by amannishad0512p5zxh6
6

(a) break

(b) Jump statement(break, continue, return)

(c) Initilization

Mark me brainlest.

Answered by vishakasaxenasl
0

Answer:

(a) It stops the execution of the loop.

Termination Condition

(b) This statement doesn't require any operator or value.

Jump Statements

(c) It is used to start the loop from the beginning.​

Initialization

Explanation:

  • A termination condition is written at the end of every loop so that it can terminate after iterating over a certain number of times. If you don't write or forget to put a termination condition then your loop will run infinitely until your resources are exhausted or the program crashes.
  • Jump statements are used to transfer the control of the program from one block to another block. Examples of Jump statements are return, break, continue and pass.
  • Initialization is done at the beginning of the loop. It indicates the starting point of the loop.

Let's understand three of them in a loop syntax:

for(int i = 0; i<=50; i++)

{

if(i==15)

   break

System.out.println(i)

}

Output: This code will print then numbers from 0 to 15 only.

int i =0 // This is the initialization of the loop

i<=50 // This is termination condition

i++ // This is updation statement

break // This is a Jump statement.

#SPJ2

Similar questions