Computer Science, asked by Anonymous, 9 hours ago

Give the syntax of 'For' loop​

Answers

Answered by sardevi2005
1

Answer:

Syntax of 'For' loop -

The init step is executed first, and only once. ... If it is false, the body of the loop does not execute and the flow of control jumps to the next statement just after the 'for' loop. After the body of the 'for' loop executes, the flow of control jumps back up to the increment statement.

Hope it will help you :)

Answered by kingofself
2

Answer:

syntax of 'For' loop​

Explanation:

A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times.

syntax ;

for ( init; condition; increment )

{

  statement(s);

}

Example:

#include <stdio.h>

int main () {

int a;

  /* for loop execution */

for( a = 10; a < 20; a = a + 1 ){

printf("value of a: %d\n", a);

}

  return 0;

}

Output:

value of a: 10

value of a: 11

value of a: 12

value of a: 13

value of a: 14

value of a: 15

value of a: 16

value of a: 17

value of a: 18

value of a: 19

Attachments:
Similar questions