14-08-23 Kishore Sir Sent by Mistake Wrong Notes
14-08-23 Kishore Sir Sent by Mistake Wrong Notes
]:
&&, || used to combine two or more expressions into a
single expression.
! operator for negation. i.e. true becomes false and false
becomes true.
Note: In C compiler 0 means false and other than 0
anything is true i.e. 1.
Truth tables:
Operator Expression1 Expression2 Result
&& - and True – 1 True – 1 1
1 0 0
0 1 0
0 0 0
|| - or 1 1 1
1 0 1
0 1 1
0 0 0
!true – false
!false - true
Increment && decrement /modify operators [ ++ / -- ]:
They are used to increment or decrement a variable value by 1.
Eg: