K&R 1-14 - Histogram
Bugs.


The loop printing the histogram lines for numbers,

for(int i = 0; i &lt;= 10; ++i)



lets i become 10, which accesses num[10]. It does not exist. Undefined behavior it is.

A c idiom is to use &lt; in a loop termination condition. There are cases which require &lt;=, but they are very rare.


The loop printing the histogram lines for letters,

for(int i = 0; i &lt;= 10; ++i)



only reports counters for a to k inclusive. All other letters are not reported.
The second bug tells why magic numbers are bad. You want to report all counters in the lett array. There are sizeof(lett) / sizeof(lett[0]) of them:

    for(int i = 0; i &lt; sizeof(lett) / sizeof(lett[0]); ++i)


Ditto for num.
It is very unclear why you split handling letters into three cases. A simple

    else if (isalpha(ch)) {
        ch = tolower(ch); // No need to test for `isupper`
        ++lett[ch - `a`];
    }


is enough.
There are more whitespaces than ' ', '\n', '\t'. The ctypes.h has isspace function. Use it.
Testing for nwhite - i &gt; 0 is yet another manifestation of why &lt;= loop condition is wrong.

    for(int i = 0; i &lt; nwhite; ++i) {
        putchar('*');
    }


is all you need.
Once you fix the last two loops, all the loops doing an actual printing become identical. Factor them out into a function

void print_stars(int n)
{
    for (int i = 0; i &lt; n; i++) {
        putchar('*');
    }
    putchar('\n');
}