HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

C Program to Check Whether a Character is Alphabet or Not Using Conditional Operator ?


Q:- Write a C Program to Check Whether a Character is Alphabet or Not Using Conditional 
        Operators ?
Input

#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
char ch;
clrscr();
printf("Enter a Character =");
scanf("%c",&ch);
(ch>='a' && ch<='z' ||| ch>='A' && ch<='Z')
? printf("%c is Alphabet.",ch)
: printf("%c is not Alphabet.",ch);
getch();
       }


Output

Enter a Character = A
A is Alphabet.

Comments