luc023.c (856B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* Using conditional operators determine : 8 (1) Whether the character entered through the keyboard is a 9 lower case alphabet or not. 10 (2) Whether a character entered through the keyboard is a special 11 symbol or not. */ 12 /* Let Us C, Chap- 4, Page - 72, Qn No.: E(a) */ 13 14 #include <stdio.h> 15 int main() 16 { 17 char inp; 18 printf("Enter the character : "); 19 scanf("%c", &inp); 20 printf("\nInput Character '%c' is %s a LOWER CASE ALPHABET.", inp, 21 (inp >= 'a' && inp <= 'z') ? "" : "NOT"); 22 printf("\nInput Character '%c' is %s a SPECIAL SYMBOL.", inp, 23 (inp >= 'a' && inp <= 'z' || inp >= 'A' && inp <= 'Z' 24 || inp >= '0' && inp <= '9') ? "NOT" : ""); 25 return 0; 26 }