C Reference Alphabetic Test: isalpha()
The function isalpha() returns a non-zero if its argument is a letter of the alphabet. If it is not a letter of the alphabet, then zero is returned.
isalpha() source code example:
#include<stdio.h>
#include<ctype.h>
int main()
{
char a;
scanf( "%c", &a );
if( isalpha(a) )
printf( "This is a letter of the alphabet: %c\n", a );
else
printf( "This is NOT a letter of the alphabet: %c\n", a );
return 0;
}
This entry was posted in C Reference ctype.h Functions.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Tweet This! or use
to share this post with others.