define the logical operators in c languagethe


 

Define the Logical Operators in c language?

The Logical operators deals with the ways the relationships are able to connected. C has the following three logical operators

 

         Operator               Purpose

              &&                  logical and
             ||                     logical or
             !                       logical not

The logical operators && and || are meant to use when we wish to test more than one condition and make decision

 

An instance is

 

                                    (p

 

Truth table for the logical operators is display here using 1 and 0.

 

P

Q

P&&Q

P||Q

!P

0

0

0

0

1

1

0

0

1

0

0

1

0

1

1

1

1

1

1

0

 

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: define the logical operators in c languagethe
Reference No:- TGS0304660

Expected delivery within 24 Hours