Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save scratchyourbrain/421d570c5aea9d2eccf4 to your computer and use it in GitHub Desktop.
Save scratchyourbrain/421d570c5aea9d2eccf4 to your computer and use it in GitHub Desktop.
C Program to Check Whether a Character is an Alphabet or not
#include <stdio.h>
int main()
{
char c;
printf("Enter a character: ");
scanf("%c",&c);
if( (c>=65 && c<=90) || (c>=97 && c<=122))
printf("%c is an alphabet.",c);
else
printf("%c is not an alphabet.",c);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment