Reinvent the For loop
C, 45 chars without goto, if, for, ...

Not the smallest solution, but I find this way of doing it quite interesting in C :)

Doesn't use goto, if, for, or any other kind of control structures.

The function by itself (45 chars):

m(){int (*a[])()={m,exit};i++;(*a[i&gt;999])();}


A compilable, working program:

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

int i=0;
m(){int (*a[])()={m,exit};i++;printf("%i ",i);(*a[i&gt;999])();}

int main()
{
  m();
}