K&R histogram of length of words
Declare and initialize variables in one go
You can initialize a value at the same time you declare it. This even works for structs and arrays. For example:
int main() {   
    int c = 0;
    int length = 0;
    int hist[MAXLEN+1] = {0}; // Initializes all elements to 0

    while ((c = getchar()) != EOF) {
        ...

Use isspace()
Instead of manually checking against spaces, tabs and newlines, use isspace() from &lt;ctype.h&gt;.
Split your code into multiple functions
Even for a simple program like this, it is a good exercise to split the code into multiple functions, and reduce the responsibility of each function as much as possible. This way for example, main() could be reduced to:
int main() {
    int hist[MAXLEN + 1] = {0};

    build_histogram(hist, MAXLEN);
    print_histogram(hist, MAXLEN);
}

Then build_histogram() could be written like this:
static void build_histogram(int hist[], size_t hist_size) {
    int c;
    int length = 0;

    while ((c=getchar())!=EOF) {
        if (isspace(c)) {
            add_word(hist, hist_size, length);
            length = 0;
        } else {
            length++;
        }
    }

    add_word(hist, hist_size, length);
}

So its main function is to scan for words. Then add_word() does the actual work of recording the length of a word in the histogram:
static void add_word(int hist[], size_t hist_size, size_t length) {
    if (length &gt; hist_size)
        hist[hist_size]++;
    else if (length)
        hist[length - 1]++;
}

You can use a similar approach for print_histogram().