Ctype.h – isxdigit()
The C++ isxdigit() function determines whether the provided character is hexadecimal or not. In the header file ctype.h, the isxdigit() function is defined.
SYNTAX
Following is the syntax of isxdigit() function:-
char isxdigit( char x);
PARAMETER
It takes any valid character x as an input to the function.
OUTPUT
It return true if the passes character is a hexadecimal digit and false otherwise.
CODE
// use of isxdigit in C++
#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;
int main()
{
string s = "AaBbCxXxYyZz";
int n = s.size();
for(int i=0;i<n;i++)
{
if(isxdigit(s[i]))
cout<<s[i]<< " is a Hexadecimal character"<<endl;
else
cout<<s[i]<<" is NOT a Hexadecimal character"<<endl;
}
return 0;
}
OUTPUT
Name | Views | Likes |
---|---|---|
Cstring-strcspn() | 158 | 0 |
Cstring.h-strcmp() | 239 | 0 |
Cstring.h-strcpy() | 167 | 0 |
Cstring.h-strlen() | 214 | 0 |
Cstring.h-strpbrk() | 140 | 0 |
Cstring.h-strrchr() | 123 | 0 |
Ctype.h – toupper() | 132 | 0 |
Ctype.h- tolower() | 136 | 0 |
Ctype.h – isxdigit() | 161 | 0 |
Ctype.h – isupper() | 131 | 0 |
Ctype.h- isspace() | 146 | 0 |
Ctype.h- ispunct() | 133 | 0 |
Ctype.h- isprint() | 118 | 0 |
Ctype.h- islower() | 142 | 0 |
Ctype.h- isdigit() | 143 | 0 |
Ctype.h- iscntrl() | 126 | 0 |
Ctype.h – isblank() | 135 | 0 |
Ctype.h – isalpha() | 142 | 0 |
Ctype.h- isalnum() | 139 | 0 |
INTRODUCTION OF ctype.h LIBRARY | 120 | 0 |
EVENT LISTENER | 154 | 0 |
Using Mixins with Eventdispacher | 115 | 0 |
INTRODUCTION TO MIXINS | 152 | 0 |
Call Back function | 171 | 0 |
Eventpp Library | 362 | 0 |
Comments