isdigit [C++ Reference]
Keywords: c,string,isdigit
Date: 2008-10-14T15:42:02-0700

[[isdigit]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- fr
- it
- jp
- pl
- ru
- tr

## isdigit

Syntax:

        #include <cctype>
        int isdigit( int ch );

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

         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, isxdigit

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •