isalpha : isalpha « ctype.h « C Tutorial






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


#include <ctype.h>
  #include <stdio.h>

  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
.








18.2.isalpha
18.2.1.isalpha