Mega Code Archive

 
Categories / C Tutorial / Operator
 

The is the logical OR operator

#include <stdio.h>   int main() {     char c;       printf("Y/y?");     c=getchar();     if(c=='Y' || c=='y')     {         printf("Bye!\n");     }     else     {         printf("Okay!\n");     }     return(0); } Y/y?1 Okay!