User Tools

Site Tools


c:control_structures:for

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

c:control_structures:for [2013/01/17 23:47]
Daniel Gohlke created
c:control_structures:for [2024/02/16 01:04] (current)
Line 1: Line 1:
 +{{keywords>wiki library source code example reference}}
 +===== for =====
  
 +<code c>
 +#include <stdio.h> /* including standard library */
 +//#include <windows.h> /* uncomment this for Windows */
 +
 +    for ( init; condition; increment ){
 +    statements;    
 +    } 
 +</code>    
 +===== C Sourcecode Example =====
 +
 +<code c>
 +#include <stdio.h> /* including standard library */
 +//#include <windows.h> /* uncomment this for Windows */
 +
 +int main( void )
 +{
 +  int i;
 +  for (i=0;i<=42;i++){
 +   
 +        printf("i is : %i\n",i);
 +}
 +
 +return 0;
 +}
 +
 +</code>
 +
 +    output of for loop
 +    i is : 0
 +    i is : 1
 +    i is : 2
 +    i is : 3
 +    and so on

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/control_structures/for.txt · Last modified: 2024/02/16 01:04 (external edit)

Impressum Datenschutz