Print 1 to 100 with out loop and conditions in C -


possible duplicate:
printing 1 1000 without loop or conditionals

code print 1 100 without using loops , conditions.

void print(){         static int i;  printf("%d\n",++i);  }  void exitme(){ exit(1); }  int main(){         void (*p[2])()={print,exitme};        static int i;        (p[i++/100])();        main(); } 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -