Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Working with switch case



Header file



Iterative statement



Specifer



Test expression




Input any key from key-board and display key's feature



// AHF C PROGRAM SOLVING

//solving here basic type of programming problem

#include<stdio.h> #include<ctype.h> #define pf printf int main() { char ch; pf("\nEnter any key: "); scanf("%c",&ch); { if(isalpha(ch)>0) pf("\nThe user has entered a character."); } { if(isdigit(ch)>0) pf("\nThe user entered a disit."); } { if(isprint(ch)>0) pf("\nThe user entered a printable character."); } { if(ispunct(ch)>0) pf("\nThe user entered a punctuation key."); } { if(isspace(ch)>0) pf("\nThe user entered a a white space character."); } return(0); }
OUTPUT:


© 2018 - All rights reserved