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
Hello w
MinMaxArray
150114_ArrayOrdenado
PPCG partial solution to https://codegolf.stackexchange.com/q/120870/61563
My first array
Goodone tricky
Print Bash Version.c
150115_EsMatrizOrdenada
PRIMER PROGRAMA CON MALLOC()
Taco practice