Wednesday, 20 September 2017

Logical Operators in C with PROGRAM #12



Key Points :

Logical Operators:-
                                The operators which are used in logical situations or which work only on True or False
(1 or 0) are known as logical operators.

                These are as follows:


                                 operators                                                                           Meaning

                                1] &&                                                                                    Logical AND
                                2] ||                                                                                      Logical OR
                                3] !                                                                                         Logical NOT

                # Truth table of AND
                                a                              b                             AND Result
                                0                              0                                  0
                                0                              1                                  0
                                1                              0                                  0
                                1                              1                                  1

                # Truth table of OR
                                a                              b                             OR Result
                                0                              0                                  0
                                0                              1                                  1
                                1                              0                                  1
                                1                              1                                  1

                # Truth table of NOT
                                a                              NOT Result
                                0                                  1
                                1                                  0


No comments:

Post a Comment

Popular Posts :