Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Python Programs
    • Java Programs

isxdigit in C

by suresh

The C isxdigit function checks whether the given character is hexadecimal or not. The below isxdigit function accept a character as the parameter and find whether that character is hexadecimal or not.

isxdigit(char)

isxdigit in C Programming Example 1

The isxdigit function finds whether the user given character is a hexadecimal character or not.

//Example for isxdigit in C Programming
#include <stdio.h>
#include <ctype.h>

int main()
{
    char ch = '5';
    
    if(isxdigit(ch))
    {
        printf("\nYou have entered a Hexadecimal Character \n");
    }
    else
    {
        printf("\n %c is not a Hexadecimal Character", ch);
    }
    return 0;
}

isxdigit in C programming 1

isxdigit Example 2

This program allows the user to enter any character. Next, it check whether the given character is a hexadecimal or not using the C Programming isxdigit function.

//Example for isxdigit in C Programming
#include <stdio.h>
#include <ctype.h>

int main()
{
    char ch;
    
    printf("Please Enter Any Valid Character: ");
    scanf("%c", &ch);
    
    if(isxdigit(ch))
    {
        printf("\nYou have entered a Hexadecimal Character \n");
    }
    else
    {
        printf("\n %c is not a Hexadecimal Character", ch);
        printf("\n I request you to enter a Hexadecimal Character \n");
    }
    return 0;
}

OUTPUT

isxdigit in C programming 2

Let me enter another character

isxdigit in C programming 3

Placed Under: C Programming

  • C Comments
  • C Escape Sequence
  • C Programming Operators
  • C Arithmetic Operators
  • C Assignment Operators
  • C Bitwise Operators
  • C Conditional Operator
  • C Increment & Decrement Optr
  • C Logical Operators
  • C Relational Operators
  • C Sizeof Operator
  • C If Statement
  • C IF ELSE Statement
  • C Else If Statement
  • C Nested If
  • C Break Statement
  • C Continue Statement
  • C Goto Statement
  • C Switch Case
  • C For Loop
  • C While Loop
  • C Do While Loop
  • C Arrays
  • C Two Dimensional Array
  • C Multi Dimensional Array
  • C String
  • C Structures
  • C Nested Structures
  • C Array of Structures
  • C Structures and Functions
  • C Union
  • C Structure & Union differences
  • C Pointers
  • C Pass Pointers to Functions
  • C GETS
  • C fgets Function
  • C fgetc
  • C fputs function
  • C fputc
  • C Functions
  • C Types of Functions
  • C Pass Array to Functions
  • Call By Value & Call By Reference
  • C Recursion
  • C Program Examples
  • C Tutorial
  • C# Tutorial
  • Java Tutorial
  • JavaScript Tutorial
  • Python Tutorial
  • MySQL Tutorial
  • SQL Server Tutorial
  • R Tutorial
  • Power BI Tutorial
  • Tableau Tutorial
  • SSIS Tutorial
  • SSRS Tutorial
  • Informatica Tutorial
  • Talend Tutorial
  • C Programs
  • C++ Programs
  • Java Programs
  • Python Programs
  • MDX Tutorial
  • SSAS Tutorial
  • QlikView Tutorial

Copyright © 2021 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy