Web | This Site

Learning C
C Function References
C Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | About TP |  | Advertising

# C - isalnum function

## Synopsis:

    #include <stdio.h>

    int isalnum(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
    o 1 2 3 4 5 6 7 8 9

## Return Value

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

## Example

    #include <stdio.h>

    int main() {

      if( isalnum( ';' ) )
      {
         printf( "Character ; is not alphanumeric\n" );
      }
      if( isalnum( 'A' ) )
      {
         printf( "Character A is alphanumeric\n" );
      }
      return 0;
    }

It will proiduce following result:

    Character A is alphanumeric

Advertisement

Online Image Processing

Indian Baby Names