A few years late to this party.
Take advantage that isalpha('\0') is false
No need to test twice in the loop for both ch != 0 and isalpha(ch). This can readily make a faster loop.
@user7649 suggestion to stop once a non-alpha is found is a good idea.
Avoid undefined behavior (UB)
Since char may be signed, calling isalpha(ch) is undefined behavior (UB) when ch < 0 && ch != EOF. is...(ch) are specified to work when ch is in the range [0...UCHAR_MAX] and EOF. C2X draft § 7.4 1
In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined.
<string.h> functions operate as unsigned char *
For all functions in this subclause, each character shall be interpreted as if it had the type unsigned char C2X draft § 7.26.1 4
OP's code should function the same.
Imprecise requirement
"Strings are null-terminated" and "The string is not a null pointer" are not needed per the C library string definition.
A string is a contiguous sequence of characters terminated by and including the first null character. § 7.1.1 1
Maybe better to say: "The parameter c points to a C string."
Be aware of locale issues
In the default locale there are 26 + 26 characters that return isalpha() as non-zero (true). Other locales may have more. Depending on coding goals this is an advantage or not.
If code goal is only the common A-Z, a-z regardless of locale, consider making your own table.
static const unsigned char is_az[UCHAR_MAX + 1] = { //
['A'] = 1, ['B'] = 1, /* 23 more */, ['Z'] = 1,
['a'] = 1, ['b'] = 1, /* 23 more */, ['z'] = 1,
}; // The rest will be 0.
unsigned char [] array used here as it is more compact that bool [] when bool is size > 1. We could use bits of the array, but let us leave that for later.
Sample alternative:
#include <stdbool.h>
#include <ctype.h>
bool stralpha_alt(const char *c) {
const unsigned char *uc = (const unsigned char *) c;
while (isalpha(*uc)) {
uc++;
}
// Let us not assume strlen(c) > 0
// If stralpha_alt("") is to return true, then
return *uc == '\0'; // True if looping stopped due to null character.
// If stralpha_alt("") is to return false, then
return *uc == '\0' && uc != c;
}