#include <stdio.h>
int main() {
char c;
printf("Enter a character: ");
scanf("%c", &c);
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
printf("%c is an alphabet.", c);
else
printf("%c is not an alphabet.", c);
return 0;
}
Enter a character: %
% is not an alphabet.
a
' is used instead of 97
and 'z
' is used instead of 122
. Similarly, 'A
' is used instead of 65
and 'Z
' is used instead of 90
.