isalnum Function

  • It tests the given character, whether it is an alphabet (A to Z or a to z)or a digit (0 t0 9)
  • It returns nonzero if its argument is either a letter of the alphabet or a digit.
  • It returns zero if the character is not alphanumeric.

  • Syntax :
    int isalnum(int ch);

    Example

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

    Output