Special Characters in C Programming



#include <stdio.h>
//0-47, 58-64, 91-96, 123 special character in ASCII

int main()
{
    char ch;
    printf("\n Enter the character  ");
    scanf("%c", &ch); 
    ((ch>=0&&ch<=47)||(ch>=58&&ch<=64)||(ch>=91&&ch<=96)||(ch>=123))? printf("\nCharacter entered is a Special Character"):printf("\nCharacter entered is not a Special Character");
    

    return 0;
}

Comments