isalpha Function

  • It tests the given character, whether it is an alphabet (A to Z or a to z)
  • It returns nonzero if ch is a letter or zero if not.

  • Syntax :
    int isalpha(int ch);

    Example

    
    #include <ctype.h>
    
    #include <stdio.h>
    
      void main() {
    
    	char ch='a';
    
    	if(isalpha(ch)) {
    
    		printf("%c is a letter\n", ch);
    
    	}
    
    }
    
    

    Output