Sunday, 21 October 2018

isalnum() function in C programming - ctype.h library function

/* write a C program to check Enter character is Alphanumeric or Not */

#include<stdio.h>
#include<conio.h>
#include<ctype.h> // library for islower function must require it
void main()
{
       char c;
       printf("Enter character : ");
       scanf("%c",&c);
     
       if(isalnum(c)==0)
           printf("Enter character is Not  alphanumeric character");
       else
          printf("Enter character is alphanumeric  character");
getch();

}

No comments:

Post a Comment

JTable Hide and Show in Java Swing