/* * loop.c */ #include void showit(int n){ printf(" %i \n", n); } /* call what(n) in a loop */ void loop(int count, int stop, void (*what)(int n)){ if (count <= stop){ what(count); loop(count+1, stop, what); } } int main(){ loop(1, 10, &showit); return 0; }