isxdigit : isxdigit « ctype.h « C Tutorial






ItemValue
Header filectype.h
Declarationint isxdigit(int ch);
Returnreturns nonzero if ch is a hexadecimal digit; otherwise zero is returned.


A hexadecimal digit will be in one of these ranges: A-F, a-f, or 0-9.

#include <ctype.h>
  #include <stdio.h>

  int main(void)
  {
    char ch;

    for(;;) {
      ch = getchar();
      if(ch == '.'){
          break;
      }
      if(isxdigit(ch))(){
          printf("%c is hexadecimal digit\n", ch);
      }
    }

    return 0;
  }








18.12.isxdigit
18.12.1.isxdigit