C Programming: For Loop

Syntax
The syntax of a for loop in C programming language is −

for ( init; condition; increment ) {
statement(s);
}


Program:
#include

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

top wedding photographerin bangladesh

Related News

Leave a Comment