Advertisement
touhid_xml

Logical Operator - lesson 1

Jul 7th, 2015
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(){
  3.     int a = 0;
  4.     int b = 0;
  5.  
  6.     // uses of operator &&
  7.     if(a && b){
  8.         printf("The statement returns true\n");
  9.     }else{
  10.          printf("The statement returns false\n");
  11.     }
  12.  
  13.      // uses of operator ||
  14.     if(a || b){
  15.         printf("The statement returns true\n");
  16.     }else{
  17.          printf("The statement returns false\n");
  18.     }
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement