Pogram to illustrate the use of isalnum(ch) function.
#include<iostream>
#include<ctype.h>
using namespace std;
int main()
{
int ch;
cout << "enter a character\n";
ch=getchar();
if (isalnum(ch))
{
cout << "alphanumeric character";
}
else
cout << "not an alphanumeric character";
return 0;
}
Comments
Post a Comment