Back To C Flow of Control Index
//program to input a character and check whether it is equal to a or b using if statement example of OR ( || ) operator #include
#include
void main() { char ch; clrscr(); printf("enter a character"); scanf("%c",&ch); if((ch=='a') || (ch=='b')) { printf("you entered either a or b"); } getch(); }