Ctype h C Tutorial

Item Value
Header filectype.h
Declarationint isalpha(int ch);
Returnreturns nonzero if ch is a letter or zero if not.

#include 
  #include 
  int main(void)
  {
    char ch;
    for(;;) {
       ch = getchar();
       if(ch == '.') {
          break;
       }
       if(isalpha(ch)) {
          printf("%c is a letter\n", ch);
       }
    }
    return 0;
  }
a
a is a letter
a
a is a letter
d
d is a letter
.