C isdigit function

« Previous

Synopsis:

Example

#include <stdio.h>
int isdigit(int c); 

Description:

The function returns nonzero if c is any of:

Example

0 1 2 3 4 5 6 7 8 9

Return Value

The function returns nonzero if c is a digit otherwise this will return zero which will be equivalent to false.

Example

Example

#include <stdio.h>
int main() {
  if( isdigit( '9' ) )
  {
     printf( "Character 9 is a digit\n" );
  }
  if( isdigit( 'A' ) )
  {
     printf( "Character A is digit\n" );
  }
  return 0;
}

Output Will Be :

Output

Character 9 is a digit


« Previous
Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!