c Example of Logical operator 


logical operator in c using where  in need of check more than one condition . In c there are three logical operators

  1. logical AND operator &&
    if all condition are true result is true
  2. logical OR operator ||
    if only one condition is true result is true
  3. logical NOT operator !
    result is opposite of final result

output

a>b   &&  a>c  is   true

a>b   &&  b>c  is   false

a>b    ||    b>c  is   true

!(a>b)   is   false

 

(Visited 39 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image