Skip to content

Instantly share code, notes, and snippets.

@faisal95bd
Created August 23, 2022 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faisal95bd/62daba11072607ad89164a57d5cf137a to your computer and use it in GitHub Desktop.
Save faisal95bd/62daba11072607ad89164a57d5cf137a to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
char ch;
printf("Please enter any character: ");
scanf("%c", &ch);
/* Conditions for checking */
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
{
printf("Alphabet", ch);
}
else if(ch >= '0' && ch <= '9')
{
printf("Digit", ch);
}
else
{
printf("Special", ch);
}
printf("\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment