Special characters:
All Character except the English alphabet and numbers are the special characters.
Example-
! # $ % ^ & * ( ) etc.
How we identify?
-We use the ASCII value concept to identify each and every character of the keyword.
program-
#include
int main()
{
char ch;
cout<<"Enter any character"<
if((ch>='A' && ch<='Z') | (ch>='a' && ch<='z') | (ch>='0' && ch<='9'))
{
}
else
{
cout<<"It is a special character";
}
return 0;
}
Enter any character
A
It is not a special character
Enter any character
3
It is not a special character
Enter any character
$
It is a special character