Currently At: Programming Reference > C Reference > Standard C String & Character > isdigit()

isdigit()


Syntax:
#include <ctype.h>
int isdigit( int ch );


Description:
The function isdigit() returns non-zero if its argument is a digit between 0 and 9. Otherwise, zero is returned.

Example:
char c;
scanf( "%c", &c );
if( isdigit(c) )
  printf( "You entered the digit %c\n", c );


Related Topics:
isalnum(), isalpha(), iscntrl(), isgraph(), isprint(), ispunct(), isspace()


Web Standards & Support:

Link to and support eLook.org Powered by LoadedWeb Web Hosting
Valid XHTML 1.0! Valid CSS! eLook.org FireFox Extensions