Answers for "!isdigit c"

C
4

isdigit in c

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

int main()
{
    char c;
    c='0';
    printf("Result when numeric character is passed: %d", isdigit(c));

    c='+';
    printf("\nResult when non-numeric character is passed: %d", isdigit(c));

    return 0;
}
Posted by: Guest on June-07-2020
3

c isdigit function

isdigit(myChar);
Posted by: Guest on June-08-2020
0

!isdigit c

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

int main()
{
    char c;

    printf("Enter a character: ");
    scanf("%c",&c);

    if (isdigit(c) == 0)
         printf("%c is not a digit.",c);
    else
         printf("%c is a digit.",c);
    return 0;
}
Posted by: Guest on February-12-2021

Code answers related to "C"

Browse Popular Code Answers by Language