C – Logical OR

C – Logical OR 2017-07-19T18:06:29+00:00

Logical OR :

C – LOGICAL OP EXAMPLE PROGRAM :

Suppose that a and b are integer variables whose values are 10 and 3, respectively. Then the result of arithmetic expression (a>b)||(b>a) is True.

Output :

0 || 0 = 0

0 || 1 = 1

1 || 0 = 1

1 || 1 = 1

Enter first number

10

Enter second number

3

(10>3) is 1

(3 > 10) is 0

(1 || 0) is 1

(10 > 3) || (3>10) is 1 (ie True)

Prev Next