Functions of type void

Functions which do not need to return a value can be declared to be return the type void.

For example:

    void
    larger(int x, int y) {
        if (x > y)
            printf("x is larger\n");
        else
            printf("y is larger\n");
    }

Index