C++ Programming/Code/Standard C Library/Functions/isalpha
< C++ Programming < Code < Standard C Library < Functionsisalpha
Syntax |
#include <cctype>
int isalpha( int ch );
|
The function isalpha() returns non-zero if its argument is a letter of the alphabet. Otherwise, zero is returned.
char c;
scanf( "%c", &c );
if( isalpha(c) )
printf( "You entered a letter of the alphabet\n" );
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.