C - String Manipulation Functions, isalpha
Tutorials Point


  Learning C
  C Function References
  C Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     About TP     Advertising  

C - isalpha function

previous

Synopsis:

#include <stdio.h>

int isalpha(int c); 

Description:

The function returns nonzero if c is any of:

a b c d e f g h i j k l m n o p q r s t u v w x y z
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Return Value

The function returns nonzero if c is just alpha otherwise this will return zero which will be equivalent to false.

Example

#include <stdio.h>

int main() {

  if( isalpha( '9' ) )
  {
     printf( "Character 9 is not alpha\n" );
  }
  if( isalpha( 'A' ) )
  {
     printf( "Character A is alpha\n" );
  }
  return 0;
}

It will proiduce following result:

Character A is alpha


previous Printer Friendly

Advertisements


  

Advertisements



Advertisements