Write syntax of for statement.
Answers
Answered by
4
Syntax. The init step is executed first, and only once. This step allows you to declare and initialize any loop control variables. Next, the condition is evaluated. After the body of the 'for' loop executes, the flow of control jumps back up to the increment statement. The condition is now evaluated again.
1, for (int i = 0; i < 10; i++). 2, {. 3, printf(" Iteration %d\n", i);. 4, }. 5. 6, for (int i = 0, j = 2; i < 10; i++, j += 2). 7, {. 8, printf("2 x %d = %d\n", .
Similar questions
Social Sciences,
6 months ago
Chemistry,
6 months ago
Biology,
1 year ago
Biology,
1 year ago
Math,
1 year ago