Slashdot Mirror


User: Jason+Foo

Jason+Foo's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Re:I will help YOU get a JOB! (Programming puzzles on Programming Puzzles · · Score: 1

    #include <stdio.h>

    void (*function[2])(int);

    void print(int i)
    {
    printf("%d\n", i);
    function[i / 100](i + 1);
    /* put printf here instead to count down */
    }

    void nop(int i)
    {
    }

    int main(void)
    {
    function[0] = print;
    function[1] = nop;

    print(1);

    return 0;
    }