isxdigit() function in C programming language checkes that whether the given character is hexadecimal or not. isxdigit() function is defined in ctype.h header file.
Hexadecimal equivalent of Decimal Numbers:
Hexadecimal: 0 1 2 3 4 5 6 7 8 9 A B C D E F Decimal: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
char isxdigit( char x);
Input : A Output : Entered character is hexadecimal Input : 2 Output : Entered character is hexadecimal Input : @ Output : Entered character is not hexadecimal
Entered character is hexadecimal
Application : isxdigit() function in C programming language is used to find out total numbers of hexadecimals present in any given input.
Input: abc123 Output: Number of hexadecimals present in the given input is : 6 Input: abcdef Output: Number of hexadecimals present in the given input is : 6 Input: 123456@$ Output: Number of hexadecimals present in the given input is : 6
Let’s see C program on this topic:
Number of hexadecimals in string is : 7
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- isupper() function in C Language
- isalnum() function in C Language
- Difference Between C Language and LISP Language
- Stopwatch using C language
- C Language Introduction
- Signals in C language
- fgets() and gets() in C language
- kbhit in C language
- Difference between while(1) and while(0) in C language
- lvalue and rvalue in C language
- How to use POSIX semaphores in C language
- Features of C Programming Language
- Difference between Java and C language
- chdir() in C language with Examples
- Interesting facts about C Language
- How to clear console in C language?
- A C Programming Language Puzzle
- Arrays in C Language | Set 2 (Properties)
- C Programming Language Standard
- Constants vs Variables in C language
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.