Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Character testing
#include <stdio.h> int main(void) { char myChar; printf("Please enter a single Character:\n"); scanf("%c\n", &myChar); printf("The entered charcter is:%c\n", myChar); //Check if the character is a digit if (isspace(myChar))http://rextester.com/login printf("You have entered a space character\n"); else if (ispunct(myChar)) printf("You have entered an punctuation character"); else if (iscntrl(myChar)) printf("You have entered a control chacacter"); else if (isalnum(myChar)){ printf("You have entered an alphanumeric character AND "); if (isdigit(myChar)) printf("your character is a digit\n"); else if(isalpha(myChar)) if (islower(myChar)) printf("your character is an lower case alphabetic character\n"); else printf("your character is an upper case alphabeticcharacter\n"); } return 0; }
run
|
edit
|
history
|
help
0
Pointer
Largest and Second Largest number in an array
Float data type.c
ponyerb orange panther
ayudantia ejercicio 2 numero nashee
Programação em C, testes
My first 2D array
B_141121_factorial02
ptr_to_ptr
18BCE2182 ASSESS_1 Q1-7