bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / letusc / luc023.c

luc023.c (720B)


      1 /* Using conditional operators determine :
      2     (1) Whether the character entered through the keyboard is a
      3         lower case alphabet or not.
      4     (2) Whether a character entered through the keyboard is a special
      5         symbol or not. */
      6 /* Let Us C, Chap- 4, Page - 72, Qn No.: E(a) */
      7 
      8 #include <stdio.h>
      9 int main()
     10 {
     11     char inp;
     12     printf("Enter the character : ");
     13     scanf("%c", &inp);
     14     printf("\nInput Character '%c' is %s a LOWER CASE ALPHABET.", inp, 
     15         (inp >= 'a' && inp <= 'z') ? "" : "NOT");
     16     printf("\nInput Character '%c' is %s a SPECIAL SYMBOL.", inp, 
     17         (inp >= 'a' && inp <= 'z' || inp >= 'A' && inp <= 'Z' 
     18             || inp >= '0' && inp <= '9') ? "NOT" : "");
     19     return 0;
     20 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror