isalpha

Tests for an alphabetic character (a to z or A to Z) (function or macro)

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Character Manipulation

Syntax

  #include <ctype.h>    
   
  int isalpha  (  
     int   c);
  

Parameters

c
(IN) Specifies the character to be tested.

Return Values

isalpha returns a value of 0 if the argument is not an alphabetic character. Otherwise, a nonzero value is returned.

Remarks

The isalpha function or macro tests for an alphabetic character (a to z or A to Z). An alphabetic character is any character for which isupper or islower is true.

See Also

isalnum, iscntrl, isdigit, islower, isprint, ispunct, isspace, isupper, isxdigit, tolower, toupper

Example

  #include <ctype.h>  
  #include <stdio.h>  
   
  main ()  
  {  
     printf ("%d %d %d", isalpha (’2’), isalpha (’Q’), isalpha (’!’));  
  }
  

produces the following:

  0 1 0