Repetition

Repetition in c used to makes shapes, search, sort and many kind of things.Example :
#include <stdio.h>

void main()
{
      int j;
      j = -4;
      for( ; j <= 0 ; )
      {
            printf("%d\n", j);
            j = j + 1;
      }
}
Output :
-4
-3
-2
-1
0

Comments

Popular posts from this blog

Operators

Data type

Selection