Write a C program to input a character and check whether the character is alphabet or not using Conditional/Ternary operator ?:
. How to check alphabets using conditional operator in C programming.
Example
Input
Enter any character: a
Output
It is ALPHABET
Required knowledge
Basic C programming, Conditional operator, Logical operators
Program to check alphabets using conditional operator
Output
Enter any character: a It is ALPHABET
Happy coding
Recommended posts
- Conditional operator programming exercises index.
- C program to check even or odd using conditional operator.
- C program to check leap year using conditional operator.
- C program to find maximum between two numbers using conditional operator.
- C program to find maximum between three numbers using conditional operator.