Print the length of words as a vertical histogram
main()

Your main() does three things: print a prompt, count the frequencies, and print the histogram.  The latter two, in particular, are well-defined complex tasks, they each deserve to be a function.

If the input is redirected from a file, rather than typed directly on the console, then the &gt; prompt just messes up the output.  To see if standard input is a console, you should test isatty() on Unix, or _isatty() on Windows.

int main() {
    int histogram[21];
    if (isatty(fileno(stdin))) {
        putchar('&gt;');
    }
    count_word_lengths(stdin, histogram, sizeof histogram / sizeof histogram[0]);
    print_histogram(histogram, sizeof histogram / sizeof histogram[0]);
}


Counting

If the input ends abruptly with a word followed by EOF, with no intervening whitespace, then the last word doesn't get counted.

Instead of if (c != ' ' &amp;&amp; c != '\n' &amp;&amp; c != '\t'), consider using tests like isspace() and ispunct().  By the way, you are treating punctuation as if they were part of words, which is probably not the right behaviour.

If the input contains any word with length 10 or greater, then the counting terminates prematurely with no indication that anything went wrong.  (Personally, I'd choose to count all excessively long words as if it were the maximum length supported by the histogram array.)

Printing

Destroying the histogram data as you print is a bad idea, especially if it will cause a print_histogram() function to wipe out its input parameter.

Once you fix that, the printf("x ") and printf("  ") would be better with a ternary expression.

for (int row = 1; row &lt;= max_word_frequency; ++row) {
    for (int i = 0; i &lt; 9; ++i) {
        printf(row &lt;= histogram[i] ? "x " : "  ");
    }
    putchar('\n');
}