Function name : isalpha
Header file : <ctype.h>
Function prototype : int isalpha(int ch);
Function : Determine whether the character is an English letter
Parameters : int ch character to be checked
Return value : If ch is not an English letter, return 0; if ch is an English letter, return non-0
Program example : Determine whether the entered characters are English letters
#include<ctype.h>#include<stdio.h>intmain(){charch;printf(inputacharacter:);scanf(%c,&ch);if(isalpha(ch)){printf(%cisalpha.,ch) ;}else{printf(%cisnotalpha.,ch);}putchar('n');return0;}
Running results:
inputacharacter:ffisalpha.